Commit 86ac2833 by 宋祥

Merge remote-tracking branch 'origin/dev' into dev

parents ad8d6013 20c452e9
......@@ -12,7 +12,9 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
......@@ -99,4 +101,45 @@ public class UserSessionUtils extends UserSession {
return factoryCodes;
}
/**
* TODO *
* *获取登录用户所有角色的公司列表
* @return
*/
public static List<Map<String,String>> getRoleCompany(){
Map<String,String> map = new HashMap<String,String>(){{
put("companyCode","001");
put("companyName","公司A");
}};
return new ArrayList<Map<String,String>>(){{add(map);}};
}
/**
* TODO *
* *获取指定公司的部门列表
* @return
*/
public static List<Map<String,String>> getDepByCompany(String companyCode){
Map<String,String> map = new HashMap<String,String>(){{
put("depCode","001");
put("depName","公司A");
}};
return new ArrayList<Map<String,String>>(){{add(map);}};
}
/**
* TODO *
* *获取指定公司的人员列表
* @return
*/
public static List<Map<String,String>> getUserByCompany(String companyCode){
Map<String,String> map = new HashMap<String,String>(){{
put("userCode","");//工号
put("userName","");//用户名称
put("userPhone","");//用户电话
put("depCode","");//所属部门编码
put("depName","");//所属部门名称
}};
return new ArrayList<Map<String,String>>(){{add(map);}};
}
}
package com.baosight.hggp.hg.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:Hgpz008.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-07 14:09:49 create
*/
public class HGPZ008 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 帐套编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_NAT_CODE = "natCode"; /* 性质编码*/
public static final String FIELD_NAT_NAME = "natName"; /* 项目性质*/
public static final String FIELD_STATUS = "status"; /* 状态 0未启用 1启用*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 帐套编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_NAT_CODE = "NAT_CODE"; /* 性质编码*/
public static final String COL_NAT_NAME = "NAT_NAME"; /* 项目性质*/
public static final String COL_STATUS = "STATUS"; /* 状态 0未启用 1启用*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String QUERY = "hgpz008.query";
public static final String COUNT = "hgpz008.count";
public static final String INSERT = "hgpz008.insert";
public static final String UPDATE = "hgpz008.update";
public static final String DELETE = "hgpz008.delete";
private Integer id = new Integer(0);
private String accountCode = " "; /* 帐套编码*/
private String depCode = " "; /* 部门编码*/
private String natCode = " "; /* 性质编码*/
private String natName = " "; /* 项目性质*/
private Boolean status; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private Boolean deleteFlag; /* 是否删除0.否1.是*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("帐套编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_NAT_CODE);
eiColumn.setDescName("性质编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_NAT_NAME);
eiColumn.setDescName("项目性质");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGPZ008() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Integer getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Integer id) {
this.id = id;
}
/**
* get the accountCode - 帐套编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 帐套编码.
*
* @param accountCode - 帐套编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the natCode - 性质编码.
* @return the natCode
*/
public String getNatCode() {
return this.natCode;
}
/**
* set the natCode - 性质编码.
*
* @param natCode - 性质编码
*/
public void setNatCode(String natCode) {
this.natCode = natCode;
}
/**
* get the natName - 项目性质.
* @return the natName
*/
public String getNatName() {
return this.natName;
}
/**
* set the natName - 项目性质.
*
* @param natName - 项目性质
*/
public void setNatName(String natName) {
this.natName = natName;
}
/**
* get the status - 状态 0未启用 1启用.
* @return the status
*/
public Boolean getStatus() {
return this.status;
}
/**
* set the status - 状态 0未启用 1启用.
*
* @param status - 状态 0未启用 1启用
*/
public void setStatus(Boolean status) {
this.status = status;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 是否删除0.否1.是.
* @return the deleteFlag
*/
public Boolean getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除0.否1.是.
*
* @param deleteFlag - 是否删除0.否1.是
*/
public void setDeleteFlag(Boolean deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setNatCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_NAT_CODE)), natCode));
setNatName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_NAT_NAME)), natName));
setStatus(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_STATUS)), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_NAT_CODE, StringUtils.toString(natCode, eiMetadata.getMeta(FIELD_NAT_CODE)));
map.put(FIELD_NAT_NAME, StringUtils.toString(natName, eiMetadata.getMeta(FIELD_NAT_NAME)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
return map;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-07 14:09:49
Version : 1.0
schema : hggp
tableName : HGPZ008
ID INTEGER NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
NAT_CODE VARCHAR NOT NULL,
NAT_NAME VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT
-->
<sqlMap namespace="HGPZ008">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="natCode">
NAT_CODE = #natCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="natName">
NAT_NAME = #natName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ008">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 帐套编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
NAT_CODE as "natCode", <!-- 性质编码 -->
NAT_NAME as "natName", <!-- 项目性质 -->
STATUS as "status", <!-- 状态 0未启用 1启用 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
FROM ${hggpSchema}.HGPZ008 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ008 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="natCode">
NAT_CODE = #natCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="natName">
NAT_NAME = #natName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGPZ008 (ID,
ACCOUNT_CODE, <!-- 帐套编码 -->
DEP_CODE, <!-- 部门编码 -->
NAT_CODE, <!-- 性质编码 -->
NAT_NAME, <!-- 项目性质 -->
STATUS, <!-- 状态 0未启用 1启用 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG <!-- 是否删除0.否1.是 -->
)
VALUES (#id#, #accountCode#, #depCode#, #natCode#, #natName#, #status#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGPZ008 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGPZ008
SET
ACCOUNT_CODE = #accountCode#, <!-- 帐套编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
NAT_CODE = #natCode#, <!-- 性质编码 -->
NAT_NAME = #natName#, <!-- 项目性质 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
</sqlMap>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment