Commit fad58195 by liuyang

2024-09-26 复制德诚图文管理功能

parent 5d532a82
package com.baosight.hpjx.hp.yx.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.yx.domain.HPYX001;
import com.baosight.hpjx.hp.yx.domain.HPYX002;
import com.baosight.hpjx.hp.yx.domain.HPYX003;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.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 ServiceHPYX001 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, HPYX002.FIELD_SURVEY_DATE);
if (!surveyDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX003.FIELD_SURVEY_DATE, DateUtils.formatShort(surveyDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HPYX001.QUERY,new HPYX001());
}
@OperationLogAnnotation(operModul = "市场调研-环境调研",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo, HPYX001.DELETE_FLAG);
}
@OperationLogAnnotation(operModul = "市场调研-环境调研",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPYX001 hpyx001 = new HPYX001();
hpyx001.fromMap(resultRow);
if (hpyx001.getId() == null || hpyx001.getId() == 0) {
this.add(hpyx001);
} else {
this.modify(hpyx001);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX001 hpyx001) {
DaoUtils.insert(HPYX001.INSERT, hpyx001);
}
/**
* 修改操作
*/
public void modify(HPYX001 hpyx001) {
DaoUtils.update(HPYX001.UPDATE, hpyx001);
}
}
package com.baosight.hpjx.hp.yx.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.yx.domain.HPYX002;
import com.baosight.hpjx.hp.yx.domain.HPYX003;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.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 ServiceHPYX002 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, HPYX002.FIELD_SURVEY_DATE);
if (!surveyDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX003.FIELD_SURVEY_DATE, DateUtils.formatShort(surveyDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX002.QUERY, new HPYX002(),false,new HPYX002().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);
HPYX002 hgsb002 = new HPYX002();
hgsb002.fromMap(map);
DaoUtils.update(HPYX002.DELETE_FLAG, hgsb002.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) {
HPYX002 hpyx002 = new HPYX002();
hpyx002.fromMap(resultRow);
if (hpyx002.getId() == null || hpyx002.getId() == 0) {
this.add(hpyx002);
} else {
this.modify(hpyx002);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX002 hpyx002) {
DaoUtils.insert(HPYX002.INSERT, hpyx002);
}
/**
* 修改操作
*/
public void modify(HPYX002 hpyx002) {
DaoUtils.update(HPYX002.UPDATE, hpyx002);
}
}
package com.baosight.hpjx.hp.yx.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.yx.domain.HPYX002;
import com.baosight.hpjx.hp.yx.domain.HPYX003;
import com.baosight.hpjx.hp.yx.domain.HPYX003;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.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 ServiceHPYX003 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, HPYX003.FIELD_SURVEY_DATE);
if (!surveyDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HPYX003.FIELD_SURVEY_DATE, DateUtils.formatShort(surveyDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX003.QUERY, new HPYX003(),false,new HPYX003().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);
HPYX003 hpyx003 = new HPYX003();
hpyx003.fromMap(map);
DaoUtils.update(HPYX003.DELETE_FLAG, hpyx003.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) {
HPYX003 hpyx003 = new HPYX003();
hpyx003.fromMap(resultRow);
if (hpyx003.getId() == null || hpyx003.getId() == 0) {
this.add(hpyx003);
} else {
this.modify(hpyx003);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX003 hpyx003) {
DaoUtils.insert(HPYX003.INSERT, hpyx003);
}
/**
* 修改操作
*/
public void modify(HPYX003 hpyx003) {
DaoUtils.update(HPYX003.UPDATE, hpyx003);
}
}
package com.baosight.hpjx.hp.yx.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.yx.domain.HPYX002;
import com.baosight.hpjx.hp.yx.domain.HPYX003;
import com.baosight.hpjx.hp.yx.domain.HPYX004;
import com.baosight.hpjx.hp.yx.domain.HPYX004;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.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 ServiceHPYX004 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, HPYX004.FIELD_SURVEY_DATE);
if (!surveyDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HPYX004.FIELD_SURVEY_DATE, DateUtils.formatShort(surveyDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX004.QUERY, new HPYX004(),false,new HPYX004().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);
HPYX004 hpyx004 = new HPYX004();
hpyx004.fromMap(map);
DaoUtils.update(HPYX004.DELETE_FLAG, hpyx004.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) {
HPYX004 hpyx004 = new HPYX004();
hpyx004.fromMap(resultRow);
if (hpyx004.getId() == null || hpyx004.getId() == 0) {
this.add(hpyx004);
} else {
this.modify(hpyx004);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX004 hpyx004) {
DaoUtils.insert(HPYX004.INSERT, hpyx004);
}
/**
* 修改操作
*/
public void modify(HPYX004 hpyx004) {
DaoUtils.update(HPYX004.UPDATE, hpyx004);
}
}
<?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_HPYX001
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,
SURVEY_DATE VARCHAR,
DISTRICT VARCHAR,
POLICY_ENV VARCHAR,
ECONOMY_ENV VARCHAR,
SOCI_CULTURE_ENV VARCHAR,
SUPPLIER VARCHAR,
COMPETE_USER VARCHAR,
SURVEY_USER VARCHAR
-->
<sqlMap namespace="HPYX001">
<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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT like concat('%',#district#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="policyEnv">
POLICY_ENV = #policyEnv#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="economyEnv">
ECONOMY_ENV = #economyEnv#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sociCultureEnv">
SOCI_CULTURE_ENV = #sociCultureEnv#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supplier">
SUPPLIER = #supplier#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="competeUser">
COMPETE_USER = #competeUser#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX001">
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.是 -->
SURVEY_DATE as "surveyDate", <!-- 调研日期 -->
DISTRICT as "district", <!-- 区域 -->
POLICY_ENV as "policyEnv", <!-- 政策环境 -->
ECONOMY_ENV as "economyEnv", <!-- 经济环境 -->
SOCI_CULTURE_ENV as "sociCultureEnv", <!-- 社会文化环境 -->
SUPPLIER as "supplier", <!-- 涉及供应商 -->
COMPETE_USER as "competeUser", <!-- 竞争对手 -->
SURVEY_USER as "surveyUser" <!-- 调查人员 -->
FROM ${hpjxSchema}.T_HPYX001 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 ${hpjxSchema}.T_HPYX001 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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT = #district#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="policyEnv">
POLICY_ENV = #policyEnv#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="economyEnv">
ECONOMY_ENV = #economyEnv#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sociCultureEnv">
SOCI_CULTURE_ENV = #sociCultureEnv#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supplier">
SUPPLIER = #supplier#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="competeUser">
COMPETE_USER = #competeUser#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX001 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SURVEY_DATE, <!-- 调研日期 -->
DISTRICT, <!-- 区域 -->
POLICY_ENV, <!-- 政策环境 -->
ECONOMY_ENV, <!-- 经济环境 -->
SOCI_CULTURE_ENV, <!-- 社会文化环境 -->
SUPPLIER, <!-- 涉及供应商 -->
COMPETE_USER, <!-- 竞争对手 -->
SURVEY_USER <!-- 调查人员 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #surveyDate#, #district#, #policyEnv#, #economyEnv#, #sociCultureEnv#, #supplier#, #competeUser#, #surveyUser#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX001 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX001
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPYX001
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.是 -->
SURVEY_DATE = #surveyDate#, <!-- 调研日期 -->
DISTRICT = #district#, <!-- 区域 -->
POLICY_ENV = #policyEnv#, <!-- 政策环境 -->
ECONOMY_ENV = #economyEnv#, <!-- 经济环境 -->
SOCI_CULTURE_ENV = #sociCultureEnv#, <!-- 社会文化环境 -->
SUPPLIER = #supplier#, <!-- 涉及供应商 -->
COMPETE_USER = #competeUser#, <!-- 竞争对手 -->
SURVEY_USER = #surveyUser# <!-- 调查人员 -->
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_HPYX002
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,
SURVEY_DATE VARCHAR,
DISTRICT VARCHAR,
CLIENT VARCHAR,
BUY_MOTIVE VARCHAR,
BUY_AMOUNT DECIMAL,
BUY_PRODUCTS VARCHAR,
SURVEY_USER VARCHAR
-->
<sqlMap namespace="HPYX002">
<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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT like concat('%',#district#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="client">
CLIENT = #client#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="buyMotive">
BUY_MOTIVE = #buyMotive#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="buyAmount">
BUY_AMOUNT = #buyAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="buyProducts">
BUY_PRODUCTS = #buyProducts#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX002">
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.是 -->
SURVEY_DATE as "surveyDate", <!-- 调研日期 -->
DISTRICT as "district", <!-- 区域 -->
CLIENT as "client", <!-- 客户 -->
BUY_MOTIVE as "buyMotive", <!-- 购买动机 -->
BUY_AMOUNT as "buyAmount", <!-- 购买能力 -->
BUY_PRODUCTS as "buyProducts", <!-- 经常购买产品 -->
SURVEY_USER as "surveyUser" <!-- 调查人员 -->
FROM ${hpjxSchema}.T_HPYX002 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 ${hpjxSchema}.T_HPYX002 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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT = #district#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="client">
CLIENT = #client#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="buyMotive">
BUY_MOTIVE = #buyMotive#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="buyAmount">
BUY_AMOUNT = #buyAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="buyProducts">
BUY_PRODUCTS = #buyProducts#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX002 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SURVEY_DATE, <!-- 调研日期 -->
DISTRICT, <!-- 区域 -->
CLIENT, <!-- 客户 -->
BUY_MOTIVE, <!-- 购买动机 -->
BUY_AMOUNT, <!-- 购买能力 -->
BUY_PRODUCTS, <!-- 经常购买产品 -->
SURVEY_USER <!-- 调查人员 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #surveyDate#, #district#, #client#, #buyMotive#, #buyAmount#, #buyProducts#, #surveyUser#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX002 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX002
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPYX002
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.是 -->
SURVEY_DATE = #surveyDate#, <!-- 调研日期 -->
DISTRICT = #district#, <!-- 区域 -->
CLIENT = #client#, <!-- 客户 -->
BUY_MOTIVE = #buyMotive#, <!-- 购买动机 -->
BUY_AMOUNT = #buyAmount#, <!-- 购买能力 -->
BUY_PRODUCTS = #buyProducts#, <!-- 经常购买产品 -->
SURVEY_USER = #surveyUser# <!-- 调查人员 -->
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_HPYX003
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,
SURVEY_DATE VARCHAR,
DISTRICT VARCHAR,
PRODUCT_NAME VARCHAR,
QUANTITY DECIMAL,
PRICE DECIMAL,
QUALITY VARCHAR,
SURVEY_USER VARCHAR
-->
<sqlMap namespace="HPYX003">
<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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT like concat('%',#district#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quality">
QUALITY = #quality#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX003">
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.是 -->
SURVEY_DATE as "surveyDate", <!-- 调研日期 -->
DISTRICT as "district", <!-- 区域 -->
PRODUCT_NAME as "productName", <!-- 产品名称 -->
QUANTITY as "quantity", <!-- 产品数量 -->
PRICE as "price", <!-- 价格 -->
QUALITY as "quality", <!-- 质量 -->
SURVEY_USER as "surveyUser" <!-- 调查人员 -->
FROM ${hpjxSchema}.T_HPYX003 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 ${hpjxSchema}.T_HPYX003 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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT = #district#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quality">
QUALITY = #quality#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX003 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SURVEY_DATE, <!-- 调研日期 -->
DISTRICT, <!-- 区域 -->
PRODUCT_NAME, <!-- 产品名称 -->
QUANTITY, <!-- 产品数量 -->
PRICE, <!-- 价格 -->
QUALITY, <!-- 质量 -->
SURVEY_USER <!-- 调查人员 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #surveyDate#, #district#, #productName#, #quantity#, #price#, #quality#, #surveyUser#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX003 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX003
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPYX003
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.是 -->
SURVEY_DATE = #surveyDate#, <!-- 调研日期 -->
DISTRICT = #district#, <!-- 区域 -->
PRODUCT_NAME = #productName#, <!-- 产品名称 -->
QUANTITY = #quantity#, <!-- 产品数量 -->
PRICE = #price#, <!-- 价格 -->
QUALITY = #quality#, <!-- 质量 -->
SURVEY_USER = #surveyUser# <!-- 调查人员 -->
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_HPYX004
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,
SURVEY_DATE VARCHAR,
DISTRICT VARCHAR,
PRODUCT_GOOD_BAD VARCHAR,
PRICE_GOOD_BAD VARCHAR,
CHANNEL_EFFECT VARCHAR,
PROMO_METHOD_GOOD_BAD VARCHAR,
SURVEY_USER VARCHAR
-->
<sqlMap namespace="HPYX004">
<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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT like concat('%',#district#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productGoodBad">
PRODUCT_GOOD_BAD = #productGoodBad#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="priceGoodBad">
PRICE_GOOD_BAD = #priceGoodBad#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="channelEffect">
CHANNEL_EFFECT = #channelEffect#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="promoMethodGoodBad">
PROMO_METHOD_GOOD_BAD = #promoMethodGoodBad#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX004">
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.是 -->
SURVEY_DATE as "surveyDate", <!-- 调研日期 -->
DISTRICT as "district", <!-- 区域 -->
PRODUCT_GOOD_BAD as "productGoodBad", <!-- 产品优劣势 -->
PRICE_GOOD_BAD as "priceGoodBad", <!-- 价格优劣势 -->
CHANNEL_EFFECT as "channelEffect", <!-- 渠道效果 -->
PROMO_METHOD_GOOD_BAD as "promoMethodGoodBad", <!-- 促销方式优劣势 -->
SURVEY_USER as "surveyUser" <!-- 调查人员 -->
FROM ${hpjxSchema}.T_HPYX004 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 ${hpjxSchema}.T_HPYX004 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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT = #district#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productGoodBad">
PRODUCT_GOOD_BAD = #productGoodBad#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="priceGoodBad">
PRICE_GOOD_BAD = #priceGoodBad#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="channelEffect">
CHANNEL_EFFECT = #channelEffect#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="promoMethodGoodBad">
PROMO_METHOD_GOOD_BAD = #promoMethodGoodBad#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX004 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SURVEY_DATE, <!-- 调研日期 -->
DISTRICT, <!-- 区域 -->
PRODUCT_GOOD_BAD, <!-- 产品优劣势 -->
PRICE_GOOD_BAD, <!-- 价格优劣势 -->
CHANNEL_EFFECT, <!-- 渠道效果 -->
PROMO_METHOD_GOOD_BAD, <!-- 促销方式优劣势 -->
SURVEY_USER <!-- 调查人员 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #surveyDate#, #district#, #productGoodBad#, #priceGoodBad#, #channelEffect#, #promoMethodGoodBad#, #surveyUser#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX004 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX004
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPYX004
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.是 -->
SURVEY_DATE = #surveyDate#, <!-- 调研日期 -->
DISTRICT = #district#, <!-- 区域 -->
PRODUCT_GOOD_BAD = #productGoodBad#, <!-- 产品优劣势 -->
PRICE_GOOD_BAD = #priceGoodBad#, <!-- 价格优劣势 -->
CHANNEL_EFFECT = #channelEffect#, <!-- 渠道效果 -->
PROMO_METHOD_GOOD_BAD = #promoMethodGoodBad#, <!-- 促销方式优劣势 -->
SURVEY_USER = #surveyUser# <!-- 调查人员 -->
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