Commit 761be1c1 by YG8429

市场调研、销售业绩、营销资源、市场推广、车辆申请、车辆维保、车辆保险、会议室管理功能复制

parent a9dce189
...@@ -31,6 +31,29 @@ public enum DdynamicEnum { ...@@ -31,6 +31,29 @@ public enum DdynamicEnum {
PROJ_TYPE_BLOCK_ID("proj_type_block_id", "natCode", "natName", "HGPZ008.queryComboBox"), PROJ_TYPE_BLOCK_ID("proj_type_block_id", "natCode", "natName", "HGPZ008.queryComboBox"),
/** /**
* 模块:供应商档案
* 用途:供应商档案下拉框
* 编写:wwl
*/
SUPPLIER_RECORD_BLOCK_ID("supplier_record_block_id","custCode","custName","HGPZ002.queryComboBox"),
/**
* 模块:存货名称
* 用途:存货名称下拉框
* 编写:wwl
*/
INVENT_NAME_BLOCK_ID("invent_name_block_id","inventType","inventTypeName","HGPZ004.queryComboBox"),
/**
* 模块:物料清单
* 用途:物料清单部件类型 耗材 零件 部件
* 编写:ly
*/
CODESET_CODE_BLOCK_ID("codeset_code_block_id","itemCode","itemCname","HGSC002.querySmallCode"),
/**
* 模块:客户类型 * 模块:客户类型
* 用途:客户类型下拉框 * 用途:客户类型下拉框
* 编写: * 编写:
...@@ -212,14 +235,14 @@ public enum DdynamicEnum { ...@@ -212,14 +235,14 @@ public enum DdynamicEnum {
* 用途:组管理下拉框 * 用途:组管理下拉框
* 编写:w * 编写:w
*/ */
USER_GROUP_BLOCK_ID("user_group_block_id","groupCode","groupName","factoryCode","HPXSOrg.queryAppGroup"), USER_GROUP_BLOCK_ID("user_group_block_id","groupCode","groupName","factoryCode","HGXSOrg.queryAppGroup"),
/** /**
* 模块:用户企业 * 模块:用户企业
* 用途:项目档案下拉框 * 用途:项目档案下拉框
* 编写:wwl * 编写:wwl
*/ */
COMPANY_RECORD_BLOCK_ID("company_record_block_id","companyCode","companyName","HPXSUser.queryCompanyComboBox"), COMPANY_RECORD_BLOCK_ID("company_record_block_id","companyCode","companyName","HGXSUser.queryCompanyComboBox"),
/** /**
* 模块:用户公司 * 模块:用户公司
......
...@@ -169,6 +169,21 @@ public class HGConstant { ...@@ -169,6 +169,21 @@ public class HGConstant {
//委外出库单号 //委外出库单号
public static final String OUT_CODE = "OUT_CODE"; public static final String OUT_CODE = "OUT_CODE";
//车辆申请单号
public static final String VEHICLE_APPLY_NO = "VEHICLE_APPLY_NO";
// 维保单号
public static final String MAINTENANCE_NUMBER = "MAINTENANCE_NUMBER";
//会议室管理申请单号
public static final String CONFERENCE_APPLY_NO = "CONFERENCE_APPLY_NO";
//产品编码
public static final String HGYX005_PRODUCT_CODE = "HGYX005_PRODUCT_CODE";
//产品编码
public static final String PRODUCT_CODE = "PRODUCT_CODE";
//渠道编码
public static final String CHANNEL_CODE = "CHANNEL_CODE";
} }
/** /**
......
package com.baosight.hggp.hg.pz.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ015;
import com.baosight.hggp.hg.pz.domain.HGPZ015A;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHGPZ015 extends ServiceBase {
/**
* 画面初始化.
*/
@OperationLogAnnotation(operModul = "产品模板",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
HGPZ015 hppz015 = new HGPZ015();
EiInfo outInfo = super.initLoad(inInfo, hppz015);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hppz015.eiMetadata);
return inInfo;
}
/**
* 查询操作.
*/
@OperationLogAnnotation(operModul = "产品模板",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HGPZ015.query", new HGPZ015());
return outInfo;
}
/**
* 查询操作.
*/
@OperationLogAnnotation(operModul = "产品模板",operType = "查询",operDesc = "查询")
public EiInfo count(EiInfo inInfo) {
HashMap map = new HashMap();
map.put("id",inInfo.getString("id"));
List<HGPZ015> query = this.dao.query("HPPZ015.query", map);
if (query.size() > 0) {
inInfo.setStatus(1);
inInfo.set("tempName",query.get(0).getTemplateName());
}else{
inInfo.setStatus(0);
}
return inInfo;
}
/**
* 新增操作.
*/
@OperationLogAnnotation(operModul = "产品模板",operType = "新增",operDesc = "新增")
@Override
public EiInfo insert(EiInfo inInfo) {
HashMap map = new HashMap();
map.put("id",inInfo.getString("id"));
List<HGPZ015> query = this.dao.query("HGPZ015.query", map);
HGSC001 hpsc001 = HGSCTools.Hgsc001.getByCode(inInfo.getString("id"));
if (query.size() > 0) {
dao.delete("HGPZ015.delete",map);
dao.delete("HGPZ015A.delete",hpsc001.toMap());
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HGPZ015 hgpz015 = new HGPZ015();
// hgpz015.setId(Long.parseLong(inInfo.getString("id")));
hgpz015.setProjCode(hpsc001.getProjCode());
hgpz015.setTemplateName(inInfo.getString("templateName"));
hgpz015.setCreatedBy(UserSession.getUserId());
hgpz015.setCompanyCode(UserSessionUtils.getAccountCode());
hgpz015.setCreatedName(UserSession.getUserId()+"-"+UserSession.getLoginCName());
hgpz015.setCreatedTime(sdf.format(new Date()));
hgpz015.setUpdatedBy(null);
hgpz015.setUpdatedTime(null);
this.dao.insert("HGPZ015.insert", hgpz015.toMap());
//模板物料清单
map.put("companyCode", UserSessionUtils.getAccountCode());
map.put("templateName", inInfo.getString("templateName"));
map.put("projCode", hpsc001.getProjCode());
this.dao.insert("HGPZ015A.insertMb", map);
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("生成产品模板成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("生成产品模板失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("生成产品模板失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 新增操作.
*/
@OperationLogAnnotation(operModul = "产品模板",operType = "新增",operDesc = "物料生成")
public EiInfo assign(EiInfo inInfo) {
HashMap map = new HashMap();
map.put("projCode",inInfo.getString("projCode"));
try {
//模板清单
List<HGPZ015A> hppz015AList = this.dao.query("HGPZ015A.queryById",map);
if (hppz015AList.size()==0) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("生成物料清单失败!该模板物料清单不存在!");
return inInfo;
}
//生成清单
HGSC001 hpsc001New = HGSCTools.Hgsc001.getByCode(inInfo.getString("projCodeNew"));
HashMap hashMap = new HashMap();
hashMap.put("leaf",0 );
hashMap.put("projCode",hpsc001New.getProjCode());
this.dao.update("HGSC004A.updateTreeNodeLeaf2",hashMap);
HGPZTools.HgPz015A.chekParentId(hppz015AList,hpsc001New);
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("生成物料清单成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("生成物料清单板失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("生成物料清单失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 修改操作.
*/
@OperationLogAnnotation(operModul = "产品模板",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HGPZ015 hgpz015 = new HGPZ015();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgpz015.fromMap(map);
hgpz015.setUpdatedBy(UserSession.getUserId());
hgpz015.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HGPZ015.update", hgpz015.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
@OperationLogAnnotation(operModul = "产品模板",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo eiInfo) {
HGPZ015 HPPZ015 = new HGPZ015();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPPZ015.fromMap(map);
this.dao.delete("HPPZ015.delete", HPPZ015.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
}
<?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-03-11 9:59:34
Version : 1.0
schema : hpjx
tableName : T_HPPZ015
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
PROJ_CODE VARCHAR,
TEMPLATE_CODE VARCHAR,
TEMPLATE_NAME VARCHAR,
REMARK VARCHAR,
DELETE_FLAG TINYINT,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR,
UPDATED_NAME VARCHAR
-->
<sqlMap namespace="HGPZ015">
<sql id="authCondition">
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
</sql>
<sql id="condition">
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="templateCode">
TEMPLATE_CODE = #templateCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="templateName">
TEMPLATE_NAME LIKE CONCAT('%', #templateName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</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="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ015">
SELECT
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
TEMPLATE_CODE as "templateCode", <!-- 产品代码 -->
TEMPLATE_NAME as "templateName", <!-- 产品名称 -->
REMARK as "remark", <!-- 备注 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_TIME as "updatedTime", <!-- 修改人名称 -->
UPDATED_NAME as "updatedName" <!-- 修改时间 -->
FROM ${hggpSchema}.HGPZ015 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}.HGPZ015 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="templateCode">
TEMPLATE_CODE = #templateCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="templateName">
TEMPLATE_NAME = #templateName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</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="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGPZ015 (ID, <!-- ID -->
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
PROJ_CODE, <!-- 项目编码 -->
TEMPLATE_CODE, <!-- 产品代码 -->
TEMPLATE_NAME, <!-- 产品名称 -->
REMARK, <!-- 备注 -->
DELETE_FLAG, <!-- 是否删除0:否1.是 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_TIME, <!-- 修改人名称 -->
UPDATED_NAME <!-- 修改时间 -->
)
VALUES (#id#, #companyCode#, #depCode#, #projCode#, #templateCode#, #templateName#, #remark#, #deleteFlag#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedTime#, #updatedName#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGPZ015 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGPZ015
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 预留 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
TEMPLATE_CODE = #templateCode#, <!-- 产品代码 -->
TEMPLATE_NAME = #templateName#, <!-- 产品名称 -->
REMARK = #remark#, <!-- 备注 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0:否1.是 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_TIME = #updatedTime#, <!-- 修改人名称 -->
UPDATED_NAME = #updatedName# <!-- 修改时间 -->
WHERE
ID = #id#
</update>
<select id="queryDomainById" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ015">
SELECT
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
TEMPLATE_CODE as "templateCode", <!-- 产品代码 -->
TEMPLATE_NAME as "templateName", <!-- 产品名称 -->
REMARK as "remark", <!-- 备注 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_TIME as "updatedTime", <!-- 修改人名称 -->
UPDATED_NAME as "updatedName" <!-- 修改时间 -->
FROM ${hggpSchema}.HGPZ015 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
</sqlMap>
package com.baosight.hggp.hg.pz.tools; package com.baosight.hggp.hg.pz.tools;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeEnum; import com.baosight.hggp.common.InventTypeEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
...@@ -9,14 +8,12 @@ import com.baosight.hggp.core.enums.ValidFlagEnum; ...@@ -9,14 +8,12 @@ import com.baosight.hggp.core.enums.ValidFlagEnum;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.*; import com.baosight.hggp.hg.pz.domain.*;
import com.baosight.hggp.hg.sc.domain.*; import com.baosight.hggp.hg.sc.domain.*;
import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.common.ed.domain.TEDCM01;
import com.baosight.hggp.hg.pz.domain.HGPZ002; import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003; import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.domain.HGPZ005; import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ007; import com.baosight.hggp.hg.pz.domain.HGPZ007;
import com.baosight.hggp.hg.pz.domain.HGPZ009; import com.baosight.hggp.hg.pz.domain.HGPZ009;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.MapUtils; import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils; import com.baosight.hggp.util.ObjectUtils;
...@@ -24,12 +21,14 @@ import com.baosight.hggp.util.StringUtils; ...@@ -24,12 +21,14 @@ import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -161,6 +160,33 @@ public class HGPZTools { ...@@ -161,6 +160,33 @@ public class HGPZTools {
List<HGPZ006> results = DaoBase.getInstance().query(HGPZ006.QUERY, queryMap); List<HGPZ006> results = DaoBase.getInstance().query(HGPZ006.QUERY, queryMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0); return CollectionUtils.isEmpty(results) ? null : results.get(0);
} }
/**
* 拼接规格
*
* @param length
* @param width
* @param thick
* @return
*/
public static String jointSpec(BigDecimal length, BigDecimal width, BigDecimal thick) {
StringBuffer sb = new StringBuffer();
if (length != null && length.compareTo(BigDecimal.ZERO) != 0) {
sb.append(length.stripTrailingZeros().toPlainString());
}
if (width != null && width.compareTo(BigDecimal.ZERO) != 0) {
if (StringUtils.isNotBlank(sb)) {
sb.append("*");
}
sb.append(width.stripTrailingZeros().toPlainString());
}
if (thick != null && thick.compareTo(BigDecimal.ZERO) != 0) {
if (StringUtils.isNotBlank(sb)) {
sb.append("*");
}
sb.append(thick.stripTrailingZeros().toPlainString());
}
return sb.toString();
}
} }
/** /**
...@@ -865,4 +891,117 @@ public class HGPZTools { ...@@ -865,4 +891,117 @@ public class HGPZTools {
} }
public static class HgPz015A {
/**
* 查询
*
* @param prdtCode
* @return
*/
public static HGPZ015A getByPrdt(String prdtCode) {
AssertUtils.isEmpty(prdtCode, "部件编码不能为空");
Map queryMap = new HashMap();
queryMap.put("prdtCode", prdtCode);
List<HGPZ015A> results = DaoBase.getInstance().query("HPPZ015A.query", queryMap);
AssertUtils.isEmpty(results, String.format("部件编码[%s]信息不存在", prdtCode));
return results.get(0);
}
/**
* 查询节点
*
* @param id
* @return
*/
public static HGPZ015A get(Long id) {
AssertUtils.isNull(id, "节点ID不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HGPZ015A> results = DaoBase.getInstance().query("HPPZ015A.queryEntityByParentPrtdCode", queryMap);
AssertUtils.isEmpty(results, String.format("节点ID[%s]信息不存在", id));
return results.get(0);
}
/**
* 查询叶子节点
*
* @param parentId
* @return
*/
public static List<HGPZ015A> queryByParent(String parentId) {
AssertUtils.isEmpty(parentId, "节点ID不能为空");
Map queryMap = new HashMap();
queryMap.put("parentId", parentId);
return DaoBase.getInstance().query("HPPZ015A.queryEntityByParentPrtdCode", queryMap);
}
public static List queryTreeNodeByParentPrtdCode(String id) {
AssertUtils.isEmpty(id, "节点ID不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
return DaoBase.getInstance().query("HPPZ015A.queryTreeNodeByParentPrtdCode", queryMap);
}
/**
* 查询叶子节点
*
* @param hppz015AList
* @return
*/
public static void chekParentId(List<HGPZ015A> hppz015AList,HGSC001 hgsc001) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
Long root = null;
Long prdtId = null;
Long prdtId_new = null;
HGSC004A hpsc002ById = HGSCTools.THGSC004A.getByTree3(hgsc001.getProjCode(),null);
root=hpsc002ById.getId();
//处理部件
for (int i = 0; i<hppz015AList.size(); i++) {
if(hppz015AList.get(i).getLv()==2){
prdtId=hppz015AList.get(i).getId();//旧
HGSC004A hgsc004A = new HGSC004A();
hgsc004A.fromMap(hppz015AList.get(i).toMap());
hgsc004A.setId(null);
hgsc004A.setParentProdCode(root.toString());
hgsc004A.setCreatedName(UserSession.getUserId());
hgsc004A.setCreatedTime(sdf.format(new Date()));
hgsc004A.setProjCode(hgsc001.getProjCode());
hgsc004A.setProjName(hgsc001.getProjName());
hgsc004A.setParentProdName(hgsc001.getProjName());
hgsc004A.setApprovalStatus(CommonConstant.YesNo.NO_0);
// hgsc004A.setDelStatus(CommonConstant.YesNo.NO_0);
DaoBase.getInstance().insert("HGSC004A.insert", hgsc004A);
HGSC004A byProjCode;
if (prdtId_new!=null)
byProjCode = HGSCTools.THGSC004A.getByTree2(hgsc004A.getProjCode(), prdtId_new.toString());
else byProjCode = HGSCTools.THGSC004A.getByTree2(hgsc004A.getProjCode(), null);
prdtId_new=byProjCode.getId();
for (int j = 0; j<hppz015AList.size(); j++) {
if(hppz015AList.get(j).getLv()==3) {
if(Long.parseLong(hppz015AList.get(j).getParentId())==prdtId){
HGSC004A hpsc002_lv = new HGSC004A();
hpsc002_lv.fromMap(hppz015AList.get(j).toMap());
hpsc002_lv.setId(null);
hgsc004A.setParentProdCode(prdtId_new.toString());
hpsc002_lv.setCreatedName(UserSession.getUserId());
hpsc002_lv.setProjCode(hgsc001.getProjCode());
hpsc002_lv.setProjName(hgsc001.getProjName());
hpsc002_lv.setCreatedTime(sdf.format(new Date()));
hgsc004A.setApprovalStatus(CommonConstant.YesNo.NO_0);
// hpsc002_lv.setDelStatus(CommonConstant.YesNo.NO_0);
DaoBase.getInstance().insert("HGSC004A.insert", hpsc002_lv);
}
}
}
}
}
}
}
} }
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.pz.domain.HGPZ015;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Map;
/**
* @author:songx
* @date:2024/2/6,10:39
*/
public class ServiceHGSC004F extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "产品模板",operType = "查询",operDesc = "物料清单选择-产品模板-初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGPZ015().eiMetadata);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "产品模板",operType = "查询",operDesc = "物料清单选择-产品模板-查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
inInfo = super.query(inInfo, HGPZ015.QUERY, new HGPZ015());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
...@@ -147,6 +147,19 @@ ...@@ -147,6 +147,19 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="authCondition">
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC004A"> resultClass="com.baosight.hggp.hg.sc.domain.HGSC004A">
SELECT SELECT
...@@ -184,6 +197,10 @@ ...@@ -184,6 +197,10 @@
</select> </select>
<update id="updateTreeNodeLeaf2">
UPDATE ${hggpSchema}.HGSC004A SET LEAF = #leaf# WHERE PROJ_CODE = #projCode#
</update>
<select id="queryByMaterialId" parameterClass="java.util.HashMap" <select id="queryByMaterialId" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC004A"> resultClass="com.baosight.hggp.hg.sc.domain.HGSC004A">
...@@ -267,6 +284,56 @@ ...@@ -267,6 +284,56 @@
</dynamic> </dynamic>
</select> </select>
<select id="queryTree3" resultClass="com.baosight.hggp.hg.sc.domain.HGSC004A" >
SELECT ID as "id",
PROJ_CODE as "projCode",
PROJ_NAME as "projName",
ID as "label",
LEAF as "leaf",
SORT as "sort",
LV as "lv",
SPEC as "spec"
FROM ${hggpSchema}.hgsc004a
WHERE 1 = 1
<isNotEmpty prepend=" AND " property="pEname">
PARENT_PROD_CODE = #pEname#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
ORDER BY CREATED_TIME DESC
</select>
<select id="queryTree2" resultClass="com.baosight.hggp.hg.sc.domain.HGSC004A" >
SELECT ID as "id",
PROJ_CODE as "projCode",
PROJ_NAME as "projName",
ID as "label",
LEAF as "leaf",
SORT as "sort",
LV as "lv",
SPEC as "spec"
FROM ${hggpSchema}.hgsc004a
WHERE 1 = 1
AND PARENT_PROD_CODE NOT IN ('root')
AND LV != 3
<isNotEmpty prepend=" AND " property="pEname">
PARENT_PROD_CODE = #pEname#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="id">
ID != #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
ORDER BY CREATED_TIME DESC
</select>
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGSC004A (id, <!-- 主键 --> INSERT INTO ${hggpSchema}.HGSC004A (id, <!-- 主键 -->
......
...@@ -561,6 +561,25 @@ public class HGSCTools { ...@@ -561,6 +561,25 @@ public class HGSCTools {
AssertUtils.isTrue(hgsc004a.getSingleWeight().compareTo(BigDecimal.ZERO) <= 0, "单重不能小于等于0!"); AssertUtils.isTrue(hgsc004a.getSingleWeight().compareTo(BigDecimal.ZERO) <= 0, "单重不能小于等于0!");
} }
public static HGSC004A getByTree3(String projCode, String id) {
AssertUtils.isEmpty(projCode, "项目编码不能为空");
Map queryMap = new HashMap();
queryMap.put("projCode", projCode);
queryMap.put("id", id);
List<HGSC004A> results = DaoBase.getInstance().query("HGSC004A.queryTree3", queryMap);
AssertUtils.isEmpty(results, String.format("项目编码[%s]信息不存在", projCode));
return results.get(0);
}
public static HGSC004A getByTree2(String projCode, String id) {
AssertUtils.isEmpty(projCode, "项目编码不能为空");
Map queryMap = new HashMap();
queryMap.put("projCode", projCode);
queryMap.put("id", id);
List<HGSC004A> results = DaoBase.getInstance().query("HGSC004A.queryTree2", queryMap);
AssertUtils.isEmpty(results, String.format("项目编码[%s]信息不存在", projCode));
return results.get(0);
}
} }
public static class THGSC004B{ public static class THGSC004B{
public static void save(HGSC004A oldHGSC004A,HGSC004A newHGSC004A) { public static void save(HGSC004A oldHGSC004A,HGSC004A newHGSC004A) {
...@@ -2091,4 +2110,8 @@ public class HGSCTools { ...@@ -2091,4 +2110,8 @@ public class HGSCTools {
} }
} }
package com.baosight.hggp.hg.xt.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.xt.domain.HGXT001;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHGXT001 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGXT001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGXT001.QUERY, new HGXT001());
// List sum = dao.query(HPSqlConstant.HPKC001.QUERY_SUM, queryRow);
// inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆申请",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HGXT001 hpxt001 = new HGXT001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpxt001.fromMap(map);
hpxt001.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT001.DELETE_FLAG, hpxt001);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆申请",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGXT001 hpxt001 = new HGXT001();
hpxt001.fromMap(resultRow);
if (hpxt001.getId() == null || hpxt001.getId() == 0) {
this.add(hpxt001);
} else {
this.modify(hpxt001);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGXT001 hpxt001) {
this.setBaseInfo(hpxt001);
//生成车辆申请单号
hpxt001.setApplyNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.VEHICLE_APPLY_NO));
DaoUtils.insert(HGXT001.INSERT, hpxt001);
}
/**
* 设置基础信息
*
* @param hpxt001
*/
private void setBaseInfo(HGXT001 hpxt001) {
// 去除日期字符串中的-
hpxt001.setApplyDate(StringUtil.removeHorizontalLine(hpxt001.getApplyDate()));
hpxt001.setStartTime(StringUtil.removeHorizontalLine(hpxt001.getStartTime()));
hpxt001.setEndTime(StringUtil.removeHorizontalLine(hpxt001.getEndTime()));
}
/**
* 修改操作
*/
public void modify(HGXT001 hpxt001) {
DaoUtils.update(HGXT001.UPDATE, hpxt001);
}
@OperationLogAnnotation(operModul = "车辆申请",operType = "提交",operDesc = "提交审批操作")
public EiInfo approve(EiInfo inInfo){
int i = 0;
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HGXT001 hpxt001 = new HGXT001();
hpxt001.fromMap(resultRow);
hpxt001.setProApplyStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT001.UPDATE_PRO_APPLY_STATUS,hpxt001);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.approve", "提交")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("提交失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆申请",operType = "返还",operDesc = "返还操作")
public EiInfo returnStatus(EiInfo inInfo){
int i = 0;
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HGXT001 hpxt001 = new HGXT001();
hpxt001.fromMap(resultRow);
hpxt001.setStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT001.UPDATE_STATUS, hpxt001);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.returnStatus", "返还")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
logError("返还失败", e.getMessage());
return inInfo;
}
return inInfo;
}
}
package com.baosight.hggp.hg.xt.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.xt.domain.HGXT099;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ProjectInfo;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
/**
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHGXT001A extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "车辆管理-附件清单A-初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGXT099().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "车辆管理-附件清单A-查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
inInfo = super.query(inInfo, "HGXT099.queryRun", new HGXT099());
} else {
inInfo = super.query(inInfo, "HGXT099.queryDev", new HGXT099());
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.xt.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.xt.domain.HGXT001;
import com.baosight.hggp.hg.xt.domain.HGXT002;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHGXT002 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGXT002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGXT002.QUERY, new HGXT002());
// List sum = dao.query(HPSqlConstant.HPKC001.QUERY_SUM, queryRow);
// inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆保险",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HGXT002 HGXT002 = new HGXT002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGXT002.fromMap(map);
HGXT002.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT002.DELETE_FLAG, HGXT002);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆保险",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGXT002 HGXT002 = new HGXT002();
HGXT002.fromMap(resultRow);
if (HGXT002.getId() == null || HGXT002.getId() == 0) {
this.add(HGXT002);
} else {
this.modify(HGXT002);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGXT002 HGXT002) {
this.setBaseInfo(HGXT002);
DaoUtils.insert(HGXT002.INSERT, HGXT002);
}
/**
* 设置基础信息
*
* @param HGXT002
*/
private void setBaseInfo(HGXT002 HGXT002) {
// 去除日期字符串中的-
HGXT002.setApplyDate(StringUtil.removeHorizontalLine(HGXT002.getApplyDate()));
HGXT002.setApplyStatus(CommonConstant.YesNo.NO_0);
}
/**
* 修改操作
*/
public void modify(HGXT002 HGXT002) {
DaoUtils.update(HGXT002.UPDATE, HGXT002);
}
@OperationLogAnnotation(operModul = "车辆申请",operType = "提交",operDesc = "提交审批操作")
public EiInfo approve(EiInfo inInfo){
int i = 0;
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HGXT002 hpxt002 = new HGXT002();
hpxt002.fromMap(resultRow);
hpxt002.setApplyStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT002.UPDATE_PRO_APPLY_STATUS,hpxt002);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.approve", "提交")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("提交失败", e.getMessage());
return inInfo;
}
return inInfo;
}
}
package com.baosight.hggp.hg.xt.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.xt.domain.HGXT002A;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHGXT002A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGXT002A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGXT002A.QUERY, new HGXT002A());
// List sum = dao.query(HPSqlConstant.HPKC001.QUERY_SUM, queryRow);
// inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆保险详情",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HGXT002A HGXT002A = new HGXT002A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGXT002A.fromMap(map);
HGXT002A.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT002A.DELETE_FLAG, HGXT002A);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆保险详情",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGXT002A HGXT002A = new HGXT002A();
HGXT002A.fromMap(resultRow);
if (HGXT002A.getId() == null || HGXT002A.getId() == 0) {
String hpxt002Id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGXT002A.FIELD_T_HPXT002_ID);
HGXT002A.settHpxt002Id(Long.valueOf(hpxt002Id));
this.add(HGXT002A);
} else {
this.modify(HGXT002A);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGXT002A HGXT002A) {
this.setBaseInfo(HGXT002A);
DaoUtils.insert(HGXT002A.INSERT, HGXT002A);
}
/**
* 设置基础信息
*
* @param HGXT002A
*/
private void setBaseInfo(HGXT002A HGXT002A) {
// 去除日期字符串中的-
HGXT002A.setInsuranceStartDate(StringUtil.removeHorizontalLine(HGXT002A.getInsuranceStartDate()));
HGXT002A.setInsuranceEndDate(StringUtil.removeHorizontalLine(HGXT002A.getInsuranceEndDate()));
}
/**
* 修改操作
*/
public void modify(HGXT002A HGXT002A) {
DaoUtils.update(HGXT002A.UPDATE, HGXT002A);
}
}
package com.baosight.hggp.hg.xt.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.xt.domain.HGXT003;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHGXT003 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGXT003.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGXT003.QUERY, new HGXT003());
// List sum = dao.query(HPSqlConstant.HPKC001.QUERY_SUM, queryRow);
// inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆维保",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HGXT003 HGXT003 = new HGXT003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGXT003.fromMap(map);
HGXT003.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT003.DELETE_FLAG, HGXT003);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆维保",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGXT003 HGXT003 = new HGXT003();
HGXT003.fromMap(resultRow);
if (HGXT003.getId() == null || HGXT003.getId() == 0) {
this.add(HGXT003);
} else {
this.modify(HGXT003);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGXT003 HGXT003) {
this.setBaseInfo(HGXT003);
DaoUtils.insert(HGXT003.INSERT, HGXT003);
}
/**
* 设置基础信息
*
* @param HGXT003
*/
private void setBaseInfo(HGXT003 HGXT003) {
// 去除日期字符串中的-
HGXT003.setMaintenanceDate(StringUtil.removeHorizontalLine(HGXT003.getMaintenanceDate()));
//生成维保单号
HGXT003.setMaintenanceNumber(SequenceGenerator.getNextSequence(HGConstant.SequenceId.MAINTENANCE_NUMBER));
}
/**
* 修改操作
*/
public void modify(HGXT003 HGXT003) {
DaoUtils.update(HGXT003.UPDATE, HGXT003);
}
}
package com.baosight.hggp.hg.xt.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.xt.domain.HGXT004;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHGXT004 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGXT004.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGXT004.QUERY, new HGXT004());
// List sum = dao.query(HPSqlConstant.HPKC001.QUERY_SUM, queryRow);
// inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "会议室管理",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HGXT004 HGXT004 = new HGXT004();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGXT004.fromMap(map);
HGXT004.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT004.DELETE_FLAG, HGXT004);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "会议室管理",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGXT004 HGXT004 = new HGXT004();
HGXT004.fromMap(resultRow);
if (HGXT004.getId() == null || HGXT004.getId() == 0) {
this.add(HGXT004);
} else {
this.modify(HGXT004);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGXT004 HGXT004) {
this.setBaseInfo(HGXT004);
//生成会议室管理申请
HGXT004.setApplyNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CONFERENCE_APPLY_NO));
DaoUtils.insert(HGXT004.INSERT, HGXT004);
}
/**
* 设置基础信息
*
* @param HGXT004
*/
private void setBaseInfo(HGXT004 HGXT004) {
// 去除日期字符串中的-
HGXT004.setApplyDate(StringUtil.removeHorizontalLine(HGXT004.getApplyDate()));
HGXT004.setStartTime(StringUtil.removeHorizontalLine(HGXT004.getStartTime()));
HGXT004.setEndTime(StringUtil.removeHorizontalLine(HGXT004.getEndTime()));
}
/**
* 修改操作
*/
public void modify(HGXT004 HGXT004) {
DaoUtils.update(HGXT004.UPDATE, HGXT004);
}
@OperationLogAnnotation(operModul = "会议室管理",operType = "提交",operDesc = "提交审批操作")
public EiInfo approve(EiInfo inInfo){
int i = 0;
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HGXT004 HGXT004 = new HGXT004();
HGXT004.fromMap(resultRow);
HGXT004.setProApplyStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT004.UPDATE_PRO_APPLY_STATUS, HGXT004);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.approve", "提交")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("提交失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "会议室管理",operType = "返还",operDesc = "返还操作")
public EiInfo returnStatus(EiInfo inInfo){
int i = 0;
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HGXT004 HGXT004 = new HGXT004();
HGXT004.fromMap(resultRow);
HGXT004.setStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT004.UPDATE_STATUS, HGXT004);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.returnStatus", "返还")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
logError("返还失败", e.getMessage());
return inInfo;
}
return inInfo;
}
}
package com.baosight.hggp.hg.xt.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.ds.domain.HGDS002;
import com.baosight.hggp.hg.xt.domain.HGXT099;
import com.baosight.hggp.util.FileUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ProjectInfo;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.service.soa.XServiceManager;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
*
*/
public class ServiceHGXT099 extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "车辆管理-附件清单A-初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGXT099().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "车辆管理-附件清单A-查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
inInfo = super.query(inInfo, "HGXT099.queryRun", new HGXT099());
} else {
inInfo = super.query(inInfo, "HGXT099.queryDev", new HGXT099());
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "新增",operDesc = "车辆管理-附件清单A-新增操作")
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGXT099 HGXT099 = new HGXT099();
HGXT099.fromMap(resultRows.get(i));
DaoUtils.insert(HGXT099.INSERT, HGXT099);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "车辆管理-附件清单A-删除操作")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGXT099 HGXT099 = new HGXT099();
HGXT099.fromMap(resultRows.get(i));
DaoUtils.update(HGXT099.DELETE, HGXT099);
if (!HGXT099.getDocId().isEmpty()) {
this.delectDoc(HGXT099.getDocId());
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 删除文件
* @param docId 文件ID
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "删除附件文件")
public void delectDoc(String docId){
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
List<HGDS002> list = this.dao.query(HGDS002.QUERY,map);
if (list.size() > 0) {
String realPath = list.get(0).getRealPath();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HGXT099.FIELD_DOC_ID,list.get(0).getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口
EiInfo outInfo = XServiceManager.call(eiInfo);
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败");
}
}
}else {
FileUtils.deleteFile(realPath);
}
this.dao.delete(HGDS002.DELETE,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-09-26 13:10:36
Version : 1.0
schema : world
tableName : T_HPXT002
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
APPLY_DATE VARCHAR,
APPLY_NO VARCHAR,
APPLY_PERSONNEL VARCHAR,
LICENSE_PLATE_CODE VARCHAR,
DELETE_FLAG TINYINT,
APPLY_STATUS TINYINT
-->
<sqlMap namespace="HGXT002">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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="applyDate">
APPLY_DATE = #applyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyNo">
APPLY_NO = #applyNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyPersonnel">
APPLY_PERSONNEL LIKE '%' || #applyPersonnel# || '%'
</isNotEmpty>
<isNotEmpty prepend=" AND " property="licensePlateCode">
LICENSE_PLATE_CODE LIKE '%' || #licensePlateCode# || '%'
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyStatus">
APPLY_STATUS = #applyStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
CREATED_TIME &gt;= REPLACE(#createdDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
CREATED_TIME &lt;= REPLACE(#createdDateTo#, '-', '')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.xt.domain.HGXT002">
SELECT
ID as "id", <!-- 主键id -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
APPLY_DATE as "applyDate", <!-- 申请日期 -->
APPLY_NO as "applyNo", <!-- 保险单号 -->
APPLY_PERSONNEL as "applyPersonnel", <!-- 申请人 -->
LICENSE_PLATE_CODE as "licensePlateCode", <!-- 车牌号 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
APPLY_STATUS as "applyStatus" <!-- 申请状态 -->
FROM ${hggpSchema}.HGXT002 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}.HGXT002 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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="applyDate">
APPLY_DATE = #applyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyNo">
APPLY_NO = #applyNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyPersonnel">
APPLY_PERSONNEL = #applyPersonnel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="licensePlateCode">
LICENSE_PLATE_CODE = #licensePlateCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyStatus">
APPLY_STATUS = #applyStatus#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGXT002 (ID, <!-- 主键id -->
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
APPLY_DATE, <!-- 申请日期 -->
APPLY_NO, <!-- 保险单号 -->
APPLY_PERSONNEL, <!-- 申请人 -->
LICENSE_PLATE_CODE, <!-- 车牌号 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
APPLY_STATUS <!-- 申请状态 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #licensePlateCode#, #deleteFlag#, #applyStatus#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGXT002 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.T_HGXT002
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<!--修改提交状态-->
<update id="updateProApplyStatus">
UPDATE ${hggpSchema}.HGXT002
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
APPLY_STATUS = #applyStatus# <!-- 提交状态 0-未提交 1-已提交 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGXT002
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
APPLY_DATE = #applyDate#, <!-- 申请日期 -->
APPLY_NO = #applyNo#, <!-- 保险单号 -->
APPLY_PERSONNEL = #applyPersonnel#, <!-- 申请人 -->
LICENSE_PLATE_CODE = #licensePlateCode#, <!-- 车牌号 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
APPLY_STATUS = #applyStatus# <!-- 申请状态 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?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-09-26 13:10:39
Version : 1.0
schema : world
tableName : T_HPXT002A
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
LICENSE_PLATE_CODE VARCHAR,
INSURANCE_TYPE VARCHAR,
INSURANCE_COMPANY VARCHAR,
INSURANCE_START_DATE VARCHAR,
INSURANCE_END_DATE VARCHAR,
INSURANCE_AMOUNT DECIMAL,
DELETE_FLAG TINYINT
-->
<sqlMap namespace="HGXT002A">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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="licensePlateCode">
LICENSE_PLATE_CODE = #licensePlateCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceType">
INSURANCE_TYPE = #insuranceType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceCompany">
INSURANCE_COMPANY = #insuranceCompany#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceStartDate">
INSURANCE_START_DATE = #insuranceStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceEndDate">
INSURANCE_END_DATE = #insuranceEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceAmount">
INSURANCE_AMOUNT = #insuranceAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="tHpxt002Id">
T_HPXT002_ID = #tHpxt002Id#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.xt.domain.HGXT002A">
SELECT
ID as "id", <!-- 主键id -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
LICENSE_PLATE_CODE as "licensePlateCode", <!-- 车牌号 -->
INSURANCE_TYPE as "insuranceType", <!-- 车险险种 -->
INSURANCE_COMPANY as "insuranceCompany", <!-- 保险公司 -->
INSURANCE_START_DATE as "insuranceStartDate", <!-- 投保时间 -->
INSURANCE_END_DATE as "insuranceEndDate", <!-- 结束时间 -->
INSURANCE_AMOUNT as "insuranceAmount", <!-- 保险金额 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
T_HPXT002_ID as "tHpxt002Id"
FROM ${hggpSchema}.HGXT002A 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}.HGXT002A WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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="licensePlateCode">
LICENSE_PLATE_CODE = #licensePlateCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceType">
INSURANCE_TYPE = #insuranceType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceCompany">
INSURANCE_COMPANY = #insuranceCompany#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceStartDate">
INSURANCE_START_DATE = #insuranceStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceEndDate">
INSURANCE_END_DATE = #insuranceEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceAmount">
INSURANCE_AMOUNT = #insuranceAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGXT002A (ID, <!-- 主键id -->
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
LICENSE_PLATE_CODE, <!-- 车牌号 -->
INSURANCE_TYPE, <!-- 车险险种 -->
INSURANCE_COMPANY, <!-- 保险公司 -->
INSURANCE_START_DATE, <!-- 投保时间 -->
INSURANCE_END_DATE, <!-- 结束时间 -->
INSURANCE_AMOUNT, <!-- 保险金额 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
T_HPXT002_ID
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #licensePlateCode#, #insuranceType#, #insuranceCompany#, #insuranceStartDate#, #insuranceEndDate#, #insuranceAmount#, #deleteFlag#, #tHpxt002Id# )
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGXT002A WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGXT002A
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGXT002A
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
LICENSE_PLATE_CODE = #licensePlateCode#, <!-- 车牌号 -->
INSURANCE_TYPE = #insuranceType#, <!-- 车险险种 -->
INSURANCE_COMPANY = #insuranceCompany#, <!-- 保险公司 -->
INSURANCE_START_DATE = #insuranceStartDate#, <!-- 投保时间 -->
INSURANCE_END_DATE = #insuranceEndDate#, <!-- 结束时间 -->
INSURANCE_AMOUNT = #insuranceAmount#, <!-- 保险金额 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?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-10-06 15:42:22
Version : 1.0
schema : hpjx
tableName : T_HPXT003
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
MAINTENANCE_DATE VARCHAR,
MAINTENANCE_NUMBER VARCHAR,
MAINTENANCE_TYPE VARCHAR,
LICENSE_PLATE VARCHAR,
HANDLER VARCHAR,
MAINTENANCE_COST DECIMAL,
MAINTENANCE_REASON VARCHAR,
DELETE_FLAG TINYINT
-->
<sqlMap namespace="HGXT003">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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="maintenanceDate">
MAINTENANCE_DATE = #maintenanceDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceNumber">
MAINTENANCE_NUMBER = #maintenanceNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceType">
MAINTENANCE_TYPE = #maintenanceType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="licensePlate">
LICENSE_PLATE = #licensePlate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="handler">
HANDLER = #handler#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceCost">
MAINTENANCE_COST = #maintenanceCost#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceReason">
MAINTENANCE_REASON = #maintenanceReason#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.xt.domain.HGXT003">
SELECT
ID as "id", <!-- 主键id -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
MAINTENANCE_DATE as "maintenanceDate", <!-- 维护日期 -->
MAINTENANCE_NUMBER as "maintenanceNumber", <!-- 维保单号 -->
MAINTENANCE_TYPE as "maintenanceType", <!-- 维保类型 -->
LICENSE_PLATE as "licensePlate", <!-- 车牌号 -->
HANDLER as "handler", <!-- 经办人 -->
MAINTENANCE_COST as "maintenanceCost", <!-- 维保费用 -->
MAINTENANCE_REASON as "maintenanceReason", <!-- 维保原因 -->
DELETE_FLAG as "deleteFlag" <!-- 删除标记 -->
FROM ${hggpSchema}.HGXT003 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}.HGXT003 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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="maintenanceDate">
MAINTENANCE_DATE = #maintenanceDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceNumber">
MAINTENANCE_NUMBER = #maintenanceNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceType">
MAINTENANCE_TYPE = #maintenanceType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="licensePlate">
LICENSE_PLATE = #licensePlate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="handler">
HANDLER = #handler#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceCost">
MAINTENANCE_COST = #maintenanceCost#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceReason">
MAINTENANCE_REASON = #maintenanceReason#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGXT003 (ID, <!-- 主键id -->
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
MAINTENANCE_DATE, <!-- 维护日期 -->
MAINTENANCE_NUMBER, <!-- 维保单号 -->
MAINTENANCE_TYPE, <!-- 维保类型 -->
LICENSE_PLATE, <!-- 车牌号 -->
HANDLER, <!-- 经办人 -->
MAINTENANCE_COST, <!-- 维保费用 -->
MAINTENANCE_REASON, <!-- 维保原因 -->
DELETE_FLAG <!-- 删除标记 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #maintenanceDate#, #maintenanceNumber#, #maintenanceType#, #licensePlate#, #handler#, #maintenanceCost#, #maintenanceReason#, #deleteFlag#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGXT003 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGXT003
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGXT003
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
MAINTENANCE_DATE = #maintenanceDate#, <!-- 维护日期 -->
MAINTENANCE_NUMBER = #maintenanceNumber#, <!-- 维保单号 -->
MAINTENANCE_TYPE = #maintenanceType#, <!-- 维保类型 -->
LICENSE_PLATE = #licensePlate#, <!-- 车牌号 -->
HANDLER = #handler#, <!-- 经办人 -->
MAINTENANCE_COST = #maintenanceCost#, <!-- 维保费用 -->
MAINTENANCE_REASON = #maintenanceReason#, <!-- 维保原因 -->
DELETE_FLAG = #deleteFlag# <!-- 删除标记 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGXT099">
<sql id="column">
A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEP_CODE as "depCode", <!-- 部门编码 预留 -->
A.BIZ_TYPE as "bizType", <!-- 物料ID -->
A.MAT_ID as "matId", <!-- 物料ID -->
A.DOC_ID as "docId", <!-- 文件ID -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime" <!-- 修改时间 -->
</sql>
<sql id="columnDev">
<include refid="column"/>,
B.DOC_NAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="columnRun">
<include refid="column"/>,
B.RES_CNAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="authCondition">
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
A.DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
</sql>
<sql id="condition">
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType">
A.BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
A.MAT_ID = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
A.DOC_ID = #docId#
</isNotEmpty>
</sql>
<!-- 开发环境 -->
<sql id="conditionDev">
AND A.DOC_ID = B.DOC_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<!-- 正式环境 -->
<sql id="conditionRun">
AND A.DOC_ID = B.RES_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.RES_CNAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$order$
</isNotEmpty>
<isEmpty property="order">
A.ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="queryDev" resultClass="com.baosight.hggp.hg.xt.domain.HGXT099">
SELECT
<include refid="columnDev"/>
FROM ${hggpSchema}.HGXT099 A, ${hggpSchema}.TEUDM_TEMP B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countDev" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGXT099 A, ${hggpSchema}.TEUDM_TEMP B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
</select>
<select id="queryRun" resultClass="com.baosight.hggp.hg.sc.domain.HGSC099">
SELECT
<include refid="columnRun"/>
FROM ${hggpSchema}.HGXT099 A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countRun" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGXT099 A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGXT099 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
BIZ_TYPE,
MAT_ID, <!-- 物料ID -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #depCode#, #bizType#, #matId#, #docId#, #createdBy#,
#createdName#, #createdTime#
)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGXT099 WHERE ID = #id#
</delete>
</sqlMap>
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.yx.domain.HGYX005;
import com.baosight.hggp.hg.yx.domain.HGYX005A;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.List;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 销售业绩
*/
public class ServiceHGYX005 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
EiInfo eiInfo = super.initLoad(inInfo,new HGYX005());
try {
CommonMethod.initBlock(eiInfo, Arrays.asList(
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID
), null, false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return eiInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
String sellDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX005.FIELD_SELL_DATE);
if (!sellDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX005.FIELD_SELL_DATE, DateUtils.formatShort(sellDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX005.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGYX005.QUERY,new HGYX005());
}
@OperationLogAnnotation(operModul = "销售业绩",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo, HGYX005.DELETE_FLAG);
}
@OperationLogAnnotation(operModul = "销售业绩",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<HGYX005> resultRows = MapUtils.toDaoEPBases(inInfo.getBlock(EiConstant.resultBlock).getRows(), HGYX005.class);
List<HGYX005A> detailRows = MapUtils.toDaoEPBases(inInfo, CommonConstant.Field.DETAIL, HGYX005A.class);
// 写入数据
for (HGYX005 HGYX005 : resultRows) {
if (HGYX005.getId() == null || HGYX005.getId() == 0) {
this.add(HGYX005, detailRows);
} else {
this.modify(HGYX005,detailRows);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGYX005 hgyx005, List<HGYX005A> hgyx005AList) {
hgyx005.setSellDate(DateUtils.formatShort(hgyx005.getSellDate()));
DaoUtils.insert(HGYX005.INSERT, hgyx005);
for (HGYX005A hgyx005A : hgyx005AList) {
hgyx005A.setProductCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGYX005_PRODUCT_CODE));
hgyx005A.setParentId(hgyx005.getId());
DaoUtils.insert(HGYX005A.INSERT, hgyx005A);
}
}
/**
* 修改操作
*/
public void modify(HGYX005 HGYX005, List<HGYX005A> HGYX005AList) {
DaoUtils.update(HGYX005.UPDATE, HGYX005);
for (HGYX005A HGYX005A : HGYX005AList) {
if (HGYX005A.getId() == null || HGYX005A.getId() == 0) {
DaoUtils.insert(HGYX005A.INSERT, HGYX005A);
}else {
DaoUtils.update(HGYX005A.UPDATE, HGYX005A);
}
}
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.yx.domain.HGYX005A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 销售业绩明细
*/
public class ServiceHGYX005A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
String id = inInfo.getString("id");
//获取清单
List<HGYX005A> HGYX005AList = HGYXTools.HgYx005a.queryByParentId(Long.valueOf(id));
inInfo.addBlock(CommonConstant.Field.DETAIL).addRows(HGYX005AList);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
return super.query(inInfo, HGYX005A.QUERY, new HGYX005A());
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.hg.yx.domain.HGYX005A;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
/**
* @author LiuYang
* @version 1.0 2024/9/28
* @description 新增销售业绩
*/
public class ServiceHGYX005B extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID
), null, false);
inInfo.addBlock("detail").addBlockMeta(new HGYX005A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.yx.domain.HGYX005;
import com.baosight.hggp.hg.yx.domain.HGYX005A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.List;
/**
* @author LiuYang
* @version 1.0 2024/9/28
* @description 修改销售业绩
*/
public class ServiceHGYX005C extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID
), null, false);
String id = inInfo.getString("id");
HGYX005 hgyx005 = HGYXTools.HpYx005.queryById(Long.valueOf(id));
inInfo.addBlock(EiConstant.resultBlock).addRow(hgyx005);
//获取清单
List<HGYX005A> hgcw003List = HGYXTools.HgYx005a.queryByParentId(hgyx005.getId());
inInfo.addBlock(CommonConstant.Field.DETAIL).addRows(hgcw003List);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "销售业绩明细",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo, HGYX005A.DELETE);
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.yx.domain.HGYX006;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 营销资源-产品资源
*/
public class ServiceHGYX006 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_NAME_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID
), null, false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
String createdTime = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX006.FIELD_CREATED_TIME);
if (!createdTime.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX006.FIELD_CREATED_TIME, DateUtils.formatShort(createdTime));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX006.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGYX006.QUERY,new HGYX006());
}
@OperationLogAnnotation(operModul = "营销资产-产品资源",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo, HGYX006.DELETE_FLAG);
}
@OperationLogAnnotation(operModul = "营销资产-产品资源",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGYX006 hgyx006 = new HGYX006();
hgyx006.fromMap(resultRow);
if (hgyx006.getId() == null || hgyx006.getId() == 0) {
this.add(hgyx006);
} else {
this.modify(hgyx006);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGYX006 hgyx006) {
hgyx006.setProductCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PRODUCT_CODE));
DaoUtils.insert(HGYX006.INSERT, hgyx006);
}
/**
* 修改操作
*/
public void modify(HGYX006 hgyx006) {
DaoUtils.update(HGYX006.UPDATE, hgyx006);
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.yx.domain.HGYX007;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 营销资源-渠道资源
*/
public class ServiceHGYX007 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String createdTime = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX007.FIELD_CREATED_TIME);
if (!createdTime.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX007.FIELD_CREATED_TIME, DateUtils.formatShort(createdTime));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX007.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGYX007.QUERY, new HGYX007(),false,new HGYX007().eiMetadata,EiConstant.queryBlock,"resultA","resultA");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "营销资产-渠道资源",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock("resultA");
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGYX007 hgyx007 = new HGYX007();
hgyx007.fromMap(map);
DaoUtils.update(HGYX007.DELETE_FLAG, hgyx007.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "营销资产-渠道资源",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock("resultA").getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGYX007 hgyx007 = new HGYX007();
hgyx007.fromMap(resultRow);
if (hgyx007.getId() == null || hgyx007.getId() == 0) {
this.add(hgyx007);
} else {
this.modify(hgyx007);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGYX007 hgyx007) {
hgyx007.setChannelCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CHANNEL_CODE));
DaoUtils.insert(HGYX007.INSERT, hgyx007);
}
/**
* 修改操作
*/
public void modify(HGYX007 hgyx007) {
DaoUtils.update(HGYX007.UPDATE, hgyx007);
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.yx.domain.HGYX006;
import com.baosight.hggp.hg.yx.domain.HGYX008;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 营销资源-人力资源
*/
public class ServiceHGYX008 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String createdTime = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX006.FIELD_CREATED_TIME);
if (!createdTime.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX006.FIELD_CREATED_TIME, DateUtils.formatShort(createdTime));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX008.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGYX008.QUERY, new HGYX008(),false,new HGYX008().eiMetadata,EiConstant.queryBlock,"resultB","resultB");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "营销资产-人力资源",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock("resultB");
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGYX008 hgyx008 = new HGYX008();
hgyx008.fromMap(map);
DaoUtils.update(HGYX008.DELETE_FLAG, hgyx008.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "营销资产-人力资源",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock("resultB").getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGYX008 hgyx008 = new HGYX008();
hgyx008.fromMap(resultRow);
if (hgyx008.getId() == null || hgyx008.getId() == 0) {
this.add(hgyx008);
} else {
this.modify(hgyx008);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGYX008 hgyx008) {
DaoUtils.insert(HGYX008.INSERT, hgyx008);
}
/**
* 修改操作
*/
public void modify(HGYX008 hgyx008) {
DaoUtils.update(HGYX008.UPDATE, hgyx008);
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.yx.domain.HGYX009;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 营销资源-资金资源
*/
public class ServiceHGYX009 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String createdTime = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX009.FIELD_CREATED_TIME);
if (!createdTime.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX009.FIELD_CREATED_TIME, DateUtils.formatShort(createdTime));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX009.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGYX009.QUERY, new HGYX009(),false,new HGYX009().eiMetadata,EiConstant.queryBlock,"resultC","resultC");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "营销资产-资金资源",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock("resultC");
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGYX009 hgyx009 = new HGYX009();
hgyx009.fromMap(map);
DaoUtils.update(HGYX009.DELETE_FLAG, hgyx009.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "营销资产-资金资源",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock("resultC").getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGYX009 hgyx009 = new HGYX009();
hgyx009.fromMap(resultRow);
if (hgyx009.getId() == null || hgyx009.getId() == 0) {
this.add(hgyx009);
} else {
this.modify(hgyx009);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGYX009 hgyx009) {
DaoUtils.insert(HGYX009.INSERT, hgyx009);
}
/**
* 修改操作
*/
public void modify(HGYX009 hgyx009) {
DaoUtils.update(HGYX009.UPDATE, hgyx009);
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.yx.domain.HGYX010;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 市场推广
*/
public class ServiceHGYX010 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String sellDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX010.FIELD_SELL_DATE);
if (!sellDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX010.FIELD_SELL_DATE, DateUtils.formatShort(sellDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX010.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGYX010.QUERY, new HGYX010());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "市场推广",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGYX010 hgyx010 = new HGYX010();
hgyx010.fromMap(map);
DaoUtils.update(HGYX010.DELETE_FLAG, hgyx010.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "市场推广",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGYX010 hgyx010 = new HGYX010();
hgyx010.fromMap(resultRow);
if (hgyx010.getId() == null || hgyx010.getId() == 0) {
this.add(hgyx010);
} else {
this.modify(hgyx010);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGYX010 hgyx010) {
DaoUtils.insert(HGYX010.INSERT, hgyx010);
}
/**
* 修改操作
*/
public void modify(HGYX010 hgyx010) {
DaoUtils.update(HGYX010.UPDATE, hgyx010);
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.yx.domain.HGYX011;
import com.baosight.hggp.hg.yx.domain.HGYX012;
import com.baosight.hggp.hg.yx.domain.HGYX013;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 市场调研-环境调研
*/
public class ServiceHGYX011 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID
), null, false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
String surveyDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX012.FIELD_SURVEY_DATE);
if (!surveyDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX013.FIELD_SURVEY_DATE, DateUtils.formatShort(surveyDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX012.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGYX011.QUERY,new HGYX011());
}
@OperationLogAnnotation(operModul = "市场调研-环境调研",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo, HGYX011.DELETE_FLAG);
}
@OperationLogAnnotation(operModul = "市场调研-环境调研",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGYX011 hgyx011 = new HGYX011();
hgyx011.fromMap(resultRow);
if (hgyx011.getId() == null || hgyx011.getId() == 0) {
this.add(hgyx011);
} else {
this.modify(hgyx011);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGYX011 hgyx011) {
DaoUtils.insert(HGYX011.INSERT, hgyx011);
}
/**
* 修改操作
*/
public void modify(HGYX011 hgyx011) {
DaoUtils.update(HGYX011.UPDATE, hgyx011);
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.yx.domain.HGYX012;
import com.baosight.hggp.hg.yx.domain.HGYX013;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 市场调研-需求调研
*/
public class ServiceHGYX012 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String surveyDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX012.FIELD_SURVEY_DATE);
if (!surveyDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX013.FIELD_SURVEY_DATE, DateUtils.formatShort(surveyDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX012.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGYX012.QUERY, new HGYX012(),false,new HGYX012().eiMetadata,EiConstant.queryBlock,"resultA","resultA");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "市场调研-需求调研",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock("resultA");
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGYX012 hgsb012 = new HGYX012();
hgsb012.fromMap(map);
DaoUtils.update(HGYX012.DELETE_FLAG, hgsb012.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "市场调研-需求调研",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock("resultA").getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGYX012 hgyx012 = new HGYX012();
hgyx012.fromMap(resultRow);
if (hgyx012.getId() == null || hgyx012.getId() == 0) {
this.add(hgyx012);
} else {
this.modify(hgyx012);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGYX012 hgyx012) {
DaoUtils.insert(HGYX012.INSERT, hgyx012);
}
/**
* 修改操作
*/
public void modify(HGYX012 hgyx012) {
DaoUtils.update(HGYX012.UPDATE, hgyx012);
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.yx.domain.HGYX012;
import com.baosight.hggp.hg.yx.domain.HGYX013;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 市场调研-产品调研
*/
public class ServiceHGYX013 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String surveyDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX013.FIELD_SURVEY_DATE);
if (!surveyDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX013.FIELD_SURVEY_DATE, DateUtils.formatShort(surveyDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX012.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGYX013.QUERY, new HGYX013(),false,new HGYX013().eiMetadata,EiConstant.queryBlock,"resultB","resultB");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "市场调研-产品调研",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock("resultB");
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGYX013 HGYX013 = new HGYX013();
HGYX013.fromMap(map);
DaoUtils.update(HGYX013.DELETE_FLAG, HGYX013.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "市场调研-产品调研",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock("resultB").getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGYX013 hgyx013 = new HGYX013();
hgyx013.fromMap(resultRow);
if (hgyx013.getId() == null || hgyx013.getId() == 0) {
this.add(hgyx013);
} else {
this.modify(hgyx013);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGYX013 hgyx013) {
DaoUtils.insert(HGYX013.INSERT, hgyx013);
}
/**
* 修改操作
*/
public void modify(HGYX013 hgyx013) {
DaoUtils.update(HGYX013.UPDATE, hgyx013);
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.yx.domain.HGYX012;
import com.baosight.hggp.hg.yx.domain.HGYX014;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 市场调研-营销调查
*/
public class ServiceHGYX014 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String surveyDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX014.FIELD_SURVEY_DATE);
if (!surveyDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX014.FIELD_SURVEY_DATE, DateUtils.formatShort(surveyDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX012.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGYX014.QUERY, new HGYX014(),false,new HGYX014().eiMetadata,EiConstant.queryBlock,"resultC","resultC");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "市场调研-营销调查",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock("resultC");
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGYX014 hgyx014 = new HGYX014();
hgyx014.fromMap(map);
DaoUtils.update(HGYX014.DELETE_FLAG, hgyx014.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "市场调研-营销调查",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock("resultC").getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGYX014 hgyx014 = new HGYX014();
hgyx014.fromMap(resultRow);
if (hgyx014.getId() == null || hgyx014.getId() == 0) {
this.add(hgyx014);
} else {
this.modify(hgyx014);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGYX014 hgyx014) {
DaoUtils.insert(HGYX014.INSERT, hgyx014);
}
/**
* 修改操作
*/
public void modify(HGYX014 hgyx014) {
DaoUtils.update(HGYX014.UPDATE, hgyx014);
}
}
<?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-09-27 13:48:23
Version : 1.0
schema : hpjx
tableName : T_HPYX005
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
SELL_DATE VARCHAR,
CLIENT_NAME VARCHAR,
QUANTITY DECIMAL,
PRODUCT_COST DECIMAL,
AMOUNT DECIMAL,
SELL_CHANNEL VARCHAR,
SELL_AMOUNT DECIMAL,
SELL_USER VARCHAR
-->
<sqlMap namespace="HGYX005">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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>
<isNotEmpty prepend=" AND " property="sellDate">
SELL_DATE = #sellDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="clientCode">
CLIENT_CODE = #clientCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="clientName">
CLIENT_NAME = #clientName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCost">
PRODUCT_COST = #productCost#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellChannel">
SELL_CHANNEL = #sellChannel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellAmount">
SELL_AMOUNT = #sellAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellUser">
SELL_USER = #sellUser#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.yx.domain.HGYX005">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
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.是 -->
SELL_DATE as "sellDate", <!-- 销售日期 -->
CLIENT_CODE as "clientCode",
CLIENT_NAME as "clientName", <!-- 客户名称 -->
QUANTITY as "quantity", <!-- 产品数量 -->
PRODUCT_COST as "productCost", <!-- 产品成本 -->
AMOUNT as "amount", <!-- 销售金额 -->
SELL_CHANNEL as "sellChannel", <!-- 销售渠道 -->
SELL_AMOUNT as "sellAmount", <!-- 销售费用 -->
SELL_USER as "sellUser" <!-- 销售人员 -->
FROM ${hggpSchema}.HGYX005 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}.HGYX005 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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>
<isNotEmpty prepend=" AND " property="sellDate">
SELL_DATE = #sellDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="clientName">
CLIENT_NAME = #clientName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCost">
PRODUCT_COST = #productCost#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellChannel">
SELL_CHANNEL = #sellChannel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellAmount">
SELL_AMOUNT = #sellAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellUser">
SELL_USER = #sellUser#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGYX005 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SELL_DATE, <!-- 销售日期 -->
CLIENT_CODE, <!-- 客户编码 -->
CLIENT_NAME, <!-- 客户名称 -->
QUANTITY, <!-- 产品数量 -->
PRODUCT_COST, <!-- 产品成本 -->
AMOUNT, <!-- 销售金额 -->
SELL_CHANNEL, <!-- 销售渠道 -->
SELL_AMOUNT, <!-- 销售费用 -->
SELL_USER <!-- 销售人员 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #sellDate#, #clientCode#, #clientName#, #quantity#, #productCost#, #amount#, #sellChannel#,
#sellAmount#, #sellUser#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGYX005
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGYX005 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGYX005
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGYX005
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
SELL_DATE = #sellDate#, <!-- 销售日期 -->
CLIENT_CODE = #clientCode#,
CLIENT_NAME = #clientName#, <!-- 客户名称 -->
QUANTITY = #quantity#, <!-- 产品数量 -->
PRODUCT_COST = #productCost#, <!-- 产品成本 -->
AMOUNT = #amount#, <!-- 销售金额 -->
SELL_CHANNEL = #sellChannel#, <!-- 销售渠道 -->
SELL_AMOUNT = #sellAmount#, <!-- 销售费用 -->
SELL_USER = #sellUser# <!-- 销售人员 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?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-09-27 13:48:23
Version : 1.0
schema : hpjx
tableName : T_HPYX005A
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
PRODUCT_NAME VARCHAR,
PRODUCT_MODEL VARCHAR,
QUANTITY DECIMAL,
PRODUCT_COST DECIMAL,
AMOUNT DECIMAL,
PARENT_ID BIGINT
-->
<sqlMap namespace="HGYX005A">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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>
<isNotEmpty prepend=" AND " property="productCode">
PRODUCT_CODE = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productModel">
PRODUCT_MODEL = #productModel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCost">
PRODUCT_COST = #productCost#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.yx.domain.HGYX005A">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
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.是 -->
PRODUCT_CODE as "productCode",
PRODUCT_NAME as "productName", <!-- 产品名称 -->
PRODUCT_MODEL as "productModel", <!-- 产品型号 -->
QUANTITY as "quantity", <!-- 产品数量 -->
PRICE AS "price",
PRODUCT_COST as "productCost", <!-- 产品成本 -->
AMOUNT as "amount", <!-- 产品销售金额 -->
PARENT_ID as "parentId" <!-- 父级ID -->
FROM ${hggpSchema}.HGYX005A 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}.HGYX005A WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productModel">
PRODUCT_MODEL = #productModel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCost">
PRODUCT_COST = #productCost#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGYX005A (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
PRODUCT_CODE,
PRODUCT_NAME, <!-- 产品名称 -->
PRODUCT_MODEL, <!-- 产品型号 -->
QUANTITY, <!-- 产品数量 -->
PRICE,
PRODUCT_COST, <!-- 产品成本 -->
AMOUNT, <!-- 产品销售金额 -->
PARENT_ID <!-- 父级ID -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #productCode#, #productName#, #productModel#, #quantity#, #price#, #productCost#, #amount#,
#parentId#)
</insert>
<!-- 批量写入 -->
<insert id="batchInsert">
INSERT INTO ${hggpSchema}.HGYX005A (
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
PRODUCT_CODE,
PRODUCT_NAME, <!-- 产品名称 -->
PRODUCT_MODEL, <!-- 产品型号 -->
QUANTITY, <!-- 产品数量 -->
PRICE,
PRODUCT_COST, <!-- 产品成本 -->
AMOUNT, <!-- 产品销售金额 -->
PARENT_ID <!-- 父级ID -->
) VALUES
<iterate open="(" conjunction="), (" close=")" property="rows">
#rows[].companyCode, #rows[].depCode#, #rows[].createdBy#, #rows[].createdName#, #rows[].createdTime#,
#rows[].productCode#, #rows[].productName#, #rows[].productModel#, #rows[].quantity#, #rows[].price#,
#rows[].productCost#, #rows[].amount#, #rows[].parentId#
</iterate>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGYX005A WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGYX005A
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
PRODUCT_CODE = #productCode#,
PRODUCT_NAME = #productName#, <!-- 产品名称 -->
PRODUCT_MODEL = #productModel#, <!-- 产品型号 -->
QUANTITY = #quantity#, <!-- 产品数量 -->
PRICE = #price#,
PRODUCT_COST = #productCost#, <!-- 产品成本 -->
AMOUNT = #amount#, <!-- 产品销售金额 -->
PARENT_ID = #parentId# <!-- 父级ID -->
WHERE
ID = #id#
</update>
</sqlMap>
<?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-09-27 13:48:23
Version : 1.0
schema : hpjx
tableName : T_HPYX006
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
PRODUCT_CODE VARCHAR,
PRODUCT_NAME VARCHAR,
PRODUCT_TYPE TINYINT,
PRODUCT_PECU VARCHAR,
PRODUCT_GOOD VARCHAR,
PRODUCT_PRICE DECIMAL,
DIS_WAY VARCHAR,
PRODUCT_INVENT DECIMAL
-->
<sqlMap namespace="HGYX006">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME LIKE CONCAT('%',#createdName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
LEFT(CREATED_TIME,8) LIKE CONCAT('%',#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>
<isNotEmpty prepend=" AND " property="productCode">
PRODUCT_CODE = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
PRODUCT_TYPE = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productPecu">
PRODUCT_PECU = #productPecu#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productGood">
PRODUCT_GOOD = #productGood#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productPrice">
PRODUCT_PRICE = #productPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="disWay">
DIS_WAY = #disWay#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productInvent">
PRODUCT_INVENT = #productInvent#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.yx.domain.HGYX006">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
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.是 -->
PRODUCT_CODE as "productCode", <!-- 产品编码 -->
PRODUCT_NAME as "productName", <!-- 产品名称 -->
PRODUCT_TYPE as "productType", <!-- 产品类型 -->
PRODUCT_PECU as "productPecu", <!-- 产品特性 -->
PRODUCT_GOOD as "productGood", <!-- 产品卖点 -->
PRODUCT_PRICE as "productPrice", <!-- 产品定价 -->
DIS_WAY as "disWay", <!-- 折扣策略 -->
PRODUCT_INVENT as "productInvent" <!-- 产品库存 -->
FROM ${hggpSchema}.HGYX006 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGYX006 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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>
<isNotEmpty prepend=" AND " property="productCode">
PRODUCT_CODE = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
PRODUCT_TYPE = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productPecu">
PRODUCT_PECU = #productPecu#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productGood">
PRODUCT_GOOD = #productGood#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productPrice">
PRODUCT_PRICE = #productPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="disWay">
DIS_WAY = #disWay#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productInvent">
PRODUCT_INVENT = #productInvent#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGYX006 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
PRODUCT_CODE, <!-- 产品编码 -->
PRODUCT_NAME, <!-- 产品名称 -->
PRODUCT_TYPE, <!-- 产品类型 -->
PRODUCT_PECU, <!-- 产品特性 -->
PRODUCT_GOOD, <!-- 产品卖点 -->
PRODUCT_PRICE, <!-- 产品定价 -->
DIS_WAY, <!-- 折扣策略 -->
PRODUCT_INVENT <!-- 产品库存 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #productCode#, #productName#, #productType#, #productPecu#, #productGood#, #productPrice#, #disWay#, #productInvent#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGYX006 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGYX006
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGYX006
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
PRODUCT_CODE = #productCode#, <!-- 产品编码 -->
PRODUCT_NAME = #productName#, <!-- 产品名称 -->
PRODUCT_TYPE = #productType#, <!-- 产品类型 -->
PRODUCT_PECU = #productPecu#, <!-- 产品特性 -->
PRODUCT_GOOD = #productGood#, <!-- 产品卖点 -->
PRODUCT_PRICE = #productPrice#, <!-- 产品定价 -->
DIS_WAY = #disWay#, <!-- 折扣策略 -->
PRODUCT_INVENT = #productInvent# <!-- 产品库存 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?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-09-27 13:48:23
Version : 1.0
schema : hpjx
tableName : T_HPYX007
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
CHANNEL_CODE VARCHAR,
CHANNEL_NAME VARCHAR,
COVER_DIST VARCHAR,
TAR_MARKET VARCHAR,
BUS_PART VARCHAR
-->
<sqlMap namespace="HGYX007">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME LIKE CONCAT('%',#createdName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
LEFT(CREATED_TIME,8) LIKE CONCAT('%',#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>
<isNotEmpty prepend=" AND " property="channelCode">
CHANNEL_CODE = #channelCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="channelName">
CHANNEL_NAME = #channelName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="coverDist">
COVER_DIST = #coverDist#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="tarMarket">
TAR_MARKET = #tarMarket#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="busPart">
BUS_PART = #busPart#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.yx.domain.HGYX007">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
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.是 -->
CHANNEL_CODE as "channelCode", <!-- 渠道编码 -->
CHANNEL_NAME as "channelName", <!-- 渠道名称 -->
COVER_DIST as "coverDist", <!-- 覆盖范围 -->
TAR_MARKET as "tarMarket", <!-- 目标市场 -->
BUS_PART as "busPart" <!-- 合作伙伴 -->
FROM ${hggpSchema}.HGYX007 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGYX007 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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>
<isNotEmpty prepend=" AND " property="channelCode">
CHANNEL_CODE = #channelCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="channelName">
CHANNEL_NAME = #channelName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="coverDist">
COVER_DIST = #coverDist#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="tarMarket">
TAR_MARKET = #tarMarket#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="busPart">
BUS_PART = #busPart#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGYX007 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
CHANNEL_CODE, <!-- 渠道编码 -->
CHANNEL_NAME, <!-- 渠道名称 -->
COVER_DIST, <!-- 覆盖范围 -->
TAR_MARKET, <!-- 目标市场 -->
BUS_PART <!-- 合作伙伴 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #channelCode#, #channelName#, #coverDist#, #tarMarket#, #busPart#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGYX007 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGYX007
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGYX007
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
CHANNEL_CODE = #channelCode#, <!-- 渠道编码 -->
CHANNEL_NAME = #channelName#, <!-- 渠道名称 -->
COVER_DIST = #coverDist#, <!-- 覆盖范围 -->
TAR_MARKET = #tarMarket#, <!-- 目标市场 -->
BUS_PART = #busPart# <!-- 合作伙伴 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?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-09-27 13:48:23
Version : 1.0
schema : hpjx
tableName : T_HPYX008
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
NAME VARCHAR,
POSITION VARCHAR,
DEGREE VARCHAR,
PROFES VARCHAR,
SKILL VARCHAR,
SPECIALITY VARCHAR,
WORK_EXPE VARCHAR
-->
<sqlMap namespace="HGYX008">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME LIKE CONCAT('%',#createdName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
LEFT(CREATED_TIME,8) LIKE CONCAT('%',#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>
<isNotEmpty prepend=" AND " property="name">
NAME = #name#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="position">
POSITION = #position#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="degree">
DEGREE = #degree#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="profes">
PROFES = #profes#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="skill">
SKILL = #skill#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="speciality">
SPECIALITY = #speciality#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workExpe">
WORK_EXPE = #workExpe#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.yx.domain.HGYX008">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
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.是 -->
NAME as "name", <!-- 姓名 -->
POSITION as "position", <!-- 职位 -->
DEGREE as "degree", <!-- 学历 -->
PROFES as "profes", <!-- 专业 -->
SKILL as "skill", <!-- 技能 -->
SPECIALITY as "speciality", <!-- 专长 -->
WORK_EXPE as "workExpe" <!-- 工作经历 -->
FROM ${hggpSchema}.HGYX008 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGYX008 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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>
<isNotEmpty prepend=" AND " property="name">
NAME = #name#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="position">
POSITION = #position#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="degree">
DEGREE = #degree#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="profes">
PROFES = #profes#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="skill">
SKILL = #skill#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="speciality">
SPECIALITY = #speciality#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workExpe">
WORK_EXPE = #workExpe#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGYX008 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
NAME, <!-- 姓名 -->
POSITION, <!-- 职位 -->
DEGREE, <!-- 学历 -->
PROFES, <!-- 专业 -->
SKILL, <!-- 技能 -->
SPECIALITY, <!-- 专长 -->
WORK_EXPE <!-- 工作经历 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #name#, #position#, #degree#, #profes#, #skill#, #speciality#, #workExpe#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGYX008 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGYX008
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGYX008
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
NAME = #name#, <!-- 姓名 -->
POSITION = #position#, <!-- 职位 -->
DEGREE = #degree#, <!-- 学历 -->
PROFES = #profes#, <!-- 专业 -->
SKILL = #skill#, <!-- 技能 -->
SPECIALITY = #speciality#, <!-- 专长 -->
WORK_EXPE = #workExpe# <!-- 工作经历 -->
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