Commit af47ff5a by liuyang

2024-09-28 营销管理

parent 49cafc1a
......@@ -119,6 +119,8 @@ public class HPConstant {
public static final String PRODUCT_CODE = "PRODUCT_CODE";
//渠道编码
public static final String CHANNEL_CODE = "CHANNEL_CODE";
//产品编码
public static final String HPYX005_PRODUCT_CODE = "HPYX005_PRODUCT_CODE";
}
/**
......
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.wd.domain.HPWD001;
import com.baosight.hpjx.hp.yx.domain.*;
import com.baosight.hpjx.hp.yx.domain.HPYX005;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
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 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 ServiceHPYX005 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
EiInfo eiInfo = super.initLoad(inInfo,new HPYX005());
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, HPYX005.FIELD_SELL_DATE);
if (!sellDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX005.FIELD_SELL_DATE, DateUtils.formatShort(sellDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX005.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HPYX005.QUERY,new HPYX005());
}
@OperationLogAnnotation(operModul = "销售业绩",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo, HPYX005.DELETE_FLAG);
}
@OperationLogAnnotation(operModul = "销售业绩",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<HPYX005> resultRows = MapUtils.toDaoEPBases(inInfo.getBlock(EiConstant.resultBlock).getRows(), HPYX005.class);
List<HPYX005A> detailRows = MapUtils.toDaoEPBases(inInfo, CommonConstant.Field.DETAIL, HPYX005A.class);
// 写入数据
for (HPYX005 hpyx005 : resultRows) {
if (hpyx005.getId() == null || hpyx005.getId() == 0) {
this.add(hpyx005, detailRows);
} else {
this.modify(hpyx005,detailRows);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX005 hpyx005, List<HPYX005A> hpyx005AList) {
hpyx005.setSellDate(DateUtils.formatShort(hpyx005.getSellDate()));
DaoUtils.insert(HPYX005.INSERT, hpyx005);
for (HPYX005A hpyx005A:hpyx005AList) {
hpyx005A.setProductCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPYX005_PRODUCT_CODE));
hpyx005A.setParentId(hpyx005.getId());
DaoUtils.insert(HPYX005A.INSERT, hpyx005A);
}
}
/**
* 修改操作
*/
public void modify(HPYX005 hpyx005, List<HPYX005A> hpyx005AList) {
DaoUtils.update(HPYX005.UPDATE, hpyx005);
for (HPYX005A hpyx005A: hpyx005AList) {
if (hpyx005A.getId() == null || hpyx005A.getId() == 0) {
DaoUtils.insert(HPYX005A.INSERT, hpyx005A);
}else {
DaoUtils.update(HPYX005A.UPDATE, hpyx005A);
}
}
}
}
package com.baosight.hpjx.hp.yx.service;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.hp.yx.domain.HPYX005;
import com.baosight.hpjx.hp.yx.domain.HPYX005A;
import com.baosight.hpjx.hp.yx.tools.HPYXTools;
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.List;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 销售业绩明细
*/
public class ServiceHPYX005A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
String id = inInfo.getString("id");
//获取清单
List<HPYX005A> hpyx005AList = HPYXTools.HpYx005a.queryByParentId(Long.valueOf(id));
inInfo.addBlock(CommonConstant.Field.DETAIL).addRows(hpyx005AList);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
return super.query(inInfo, HPYX005A.QUERY, new HPYX005A());
}
}
package com.baosight.hpjx.hp.yx.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.yx.domain.HPYX005A;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.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 ServiceHPYX005B 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 HPYX005A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
}
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.hp.yx.domain.HPYX005;
import com.baosight.hpjx.hp.yx.domain.HPYX005A;
import com.baosight.hpjx.hp.yx.tools.HPYXTools;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.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 ServiceHPYX005C 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");
HPYX005 hpyx005 = HPYXTools.HpYx005.queryById(Long.valueOf(id));
inInfo.addBlock(EiConstant.resultBlock).addRow(hpyx005);
//获取清单
List<HPYX005A> hgcw003List = HPYXTools.HpYx005a.queryByParentId(hpyx005.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,HPYX005A.DELETE);
}
}
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.HPYX006;
import com.baosight.hpjx.hp.yx.domain.HPYX002;
import com.baosight.hpjx.hp.yx.domain.HPYX003;
import com.baosight.hpjx.hp.yx.domain.HPYX007;
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 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 ServiceHPYX006 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, HPYX006.FIELD_CREATED_TIME);
if (!createdTime.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX006.FIELD_CREATED_TIME, DateUtils.formatShort(createdTime));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX006.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HPYX006.QUERY,new HPYX006());
}
@OperationLogAnnotation(operModul = "营销资产-产品资源",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo, HPYX006.DELETE_FLAG);
}
@OperationLogAnnotation(operModul = "营销资产-产品资源",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPYX006 hpyx006 = new HPYX006();
hpyx006.fromMap(resultRow);
if (hpyx006.getId() == null || hpyx006.getId() == 0) {
this.add(hpyx006);
} else {
this.modify(hpyx006);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX006 hpyx006) {
hpyx006.setProductCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PRODUCT_CODE));
DaoUtils.insert(HPYX006.INSERT, hpyx006);
}
/**
* 修改操作
*/
public void modify(HPYX006 hpyx006) {
DaoUtils.update(HPYX006.UPDATE, hpyx006);
}
}
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.constant.HPConstant;
import com.baosight.hpjx.hp.yx.domain.HPYX007;
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 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 ServiceHPYX007 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, HPYX007.FIELD_CREATED_TIME);
if (!createdTime.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX007.FIELD_CREATED_TIME, DateUtils.formatShort(createdTime));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX007.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX007.QUERY, new HPYX007(),false,new HPYX007().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);
HPYX007 hpyx007 = new HPYX007();
hpyx007.fromMap(map);
DaoUtils.update(HPYX007.DELETE_FLAG, hpyx007.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) {
HPYX007 hpyx007 = new HPYX007();
hpyx007.fromMap(resultRow);
if (hpyx007.getId() == null || hpyx007.getId() == 0) {
this.add(hpyx007);
} else {
this.modify(hpyx007);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX007 hpyx007) {
hpyx007.setChannelCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CHANNEL_CODE));
DaoUtils.insert(HPYX007.INSERT, hpyx007);
}
/**
* 修改操作
*/
public void modify(HPYX007 hpyx007) {
DaoUtils.update(HPYX007.UPDATE, hpyx007);
}
}
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.HPYX006;
import com.baosight.hpjx.hp.yx.domain.HPYX008;
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 ServiceHPYX008 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, HPYX006.FIELD_CREATED_TIME);
if (!createdTime.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX006.FIELD_CREATED_TIME, DateUtils.formatShort(createdTime));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX008.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX008.QUERY, new HPYX008(),false,new HPYX008().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);
HPYX008 hpyx008 = new HPYX008();
hpyx008.fromMap(map);
DaoUtils.update(HPYX008.DELETE_FLAG, hpyx008.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) {
HPYX008 hpyx003 = new HPYX008();
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(HPYX008 hpyx003) {
DaoUtils.insert(HPYX008.INSERT, hpyx003);
}
/**
* 修改操作
*/
public void modify(HPYX008 hpyx003) {
DaoUtils.update(HPYX008.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.HPYX006;
import com.baosight.hpjx.hp.yx.domain.HPYX009;
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 ServiceHPYX009 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, HPYX009.FIELD_CREATED_TIME);
if (!createdTime.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX009.FIELD_CREATED_TIME, DateUtils.formatShort(createdTime));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX009.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX009.QUERY, new HPYX009(),false,new HPYX009().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);
HPYX009 hpyx009 = new HPYX009();
hpyx009.fromMap(map);
DaoUtils.update(HPYX009.DELETE_FLAG, hpyx009.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) {
HPYX009 hpyx009 = new HPYX009();
hpyx009.fromMap(resultRow);
if (hpyx009.getId() == null || hpyx009.getId() == 0) {
this.add(hpyx009);
} else {
this.modify(hpyx009);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX009 hpyx004) {
DaoUtils.insert(HPYX009.INSERT, hpyx004);
}
/**
* 修改操作
*/
public void modify(HPYX009 hpyx004) {
DaoUtils.update(HPYX009.UPDATE, hpyx004);
}
}
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.HPYX010;
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 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 ServiceHPYX010 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, HPYX010.FIELD_SELL_DATE);
if (!sellDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX010.FIELD_SELL_DATE, DateUtils.formatShort(sellDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX010.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX010.QUERY, new HPYX010());
} 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);
HPYX010 hpyx010 = new HPYX010();
hpyx010.fromMap(map);
DaoUtils.update(HPYX010.DELETE_FLAG, hpyx010.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) {
HPYX010 hpyx010 = new HPYX010();
hpyx010.fromMap(resultRow);
if (hpyx010.getId() == null || hpyx010.getId() == 0) {
this.add(hpyx010);
} else {
this.modify(hpyx010);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX010 hpyx010) {
DaoUtils.insert(HPYX010.INSERT, hpyx010);
}
/**
* 修改操作
*/
public void modify(HPYX010 hpyx010) {
DaoUtils.update(HPYX010.UPDATE, hpyx010);
}
}
......@@ -110,7 +110,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
SURVEY_DATE DESC,ID DESC
</isEmpty>
</dynamic>
......
......@@ -105,7 +105,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
SURVEY_DATE DESC,ID DESC
</isEmpty>
</dynamic>
......
......@@ -105,7 +105,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
SURVEY_DATE DESC,ID DESC
</isEmpty>
</dynamic>
......
......@@ -105,7 +105,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
SURVEY_DATE DESC,ID DESC
</isEmpty>
</dynamic>
......
<?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="HPYX005">
<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.hpjx.hp.yx.domain.HPYX005">
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 ${hpjxSchema}.T_HPYX005 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_HPYX005 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 ${hpjxSchema}.T_HPYX005 (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 ${hpjxSchema}.T_HPYX005
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX005 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX005
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_HPYX005
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="HPYX005A">
<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.hpjx.hp.yx.domain.HPYX005A">
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 ${hpjxSchema}.T_HPYX005A 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_HPYX005A 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 ${hpjxSchema}.T_HPYX005A (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 ${hpjxSchema}.T_HPYX005A (
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 ${hpjxSchema}.T_HPYX005A WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPYX005A
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="HPYX006">
<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.hpjx.hp.yx.domain.HPYX006">
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 ${hpjxSchema}.T_HPYX006 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 ${hpjxSchema}.T_HPYX006 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 ${hpjxSchema}.T_HPYX006 (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 ${hpjxSchema}.T_HPYX006 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX006
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_HPYX006
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="HPYX007">
<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.hpjx.hp.yx.domain.HPYX007">
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 ${hpjxSchema}.T_HPYX007 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 ${hpjxSchema}.T_HPYX007 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 ${hpjxSchema}.T_HPYX007 (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 ${hpjxSchema}.T_HPYX007 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX007
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_HPYX007
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="HPYX008">
<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.hpjx.hp.yx.domain.HPYX008">
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 ${hpjxSchema}.T_HPYX008 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 ${hpjxSchema}.T_HPYX008 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 ${hpjxSchema}.T_HPYX008 (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 ${hpjxSchema}.T_HPYX008 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX008
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_HPYX008
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>
<?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_HPYX009
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,
BUDGET DECIMAL,
SOURCE_FUNDS VARCHAR,
DIST_SITUA VARCHAR,
ACTUAL_EXPE DECIMAL
-->
<sqlMap namespace="HPYX009">
<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="budget">
BUDGET = #budget#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sourceFunds">
SOURCE_FUNDS = #sourceFunds#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="distSitua">
DIST_SITUA = #distSitua#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualExpe">
ACTUAL_EXPE = #actualExpe#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX009">
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.是 -->
BUDGET as "budget", <!-- 预算 -->
SOURCE_FUNDS as "sourceFunds", <!-- 资金来源 -->
DIST_SITUA as "distSitua", <!-- 分配情况 -->
ACTUAL_EXPE as "actualExpe" <!-- 实际支出 -->
FROM ${hpjxSchema}.T_HPYX009 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 ${hpjxSchema}.T_HPYX009 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="budget">
BUDGET = #budget#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sourceFunds">
SOURCE_FUNDS = #sourceFunds#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="distSitua">
DIST_SITUA = #distSitua#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualExpe">
ACTUAL_EXPE = #actualExpe#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX009 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
BUDGET, <!-- 预算 -->
SOURCE_FUNDS, <!-- 资金来源 -->
DIST_SITUA, <!-- 分配情况 -->
ACTUAL_EXPE <!-- 实际支出 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #budget#, #sourceFunds#, #distSitua#, #actualExpe#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX009 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX009
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_HPYX009
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.是 -->
BUDGET = #budget#, <!-- 预算 -->
SOURCE_FUNDS = #sourceFunds#, <!-- 资金来源 -->
DIST_SITUA = #distSitua#, <!-- 分配情况 -->
ACTUAL_EXPE = #actualExpe# <!-- 实际支出 -->
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_HPYX010
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,
SOURCE_FUNDS VARCHAR,
DISTRICT VARCHAR,
CONTENT VARCHAR,
GOAL_MARKET VARCHAR,
GOAL_AMOUNT DECIMAL,
GOAL_TRAN DECIMAL,
BUDGET DECIMAL,
ACTUAL_CODE DECIMAL,
ACTUAL_TRAN DECIMAL
-->
<sqlMap namespace="HPYX010">
<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="sourceFunds">
SOURCE_FUNDS like CONCAT('%',#sourceFunds#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT like CONCAT('%',#district#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="content">
CONTENT = #content#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="promChannel">
PROM_CHANNEL = #promChannel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="goalMarket">
GOAL_MARKET = #goalMarket#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="goalAmount">
GOAL_AMOUNT = #goalAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="goalTran">
GOAL_TRAN = #goalTran#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="budget">
BUDGET = #budget#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCode">
ACTUAL_CODE = #actualCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualTran">
ACTUAL_TRAN = #actualTran#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX010">
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", <!-- 推广日期 -->
SOURCE_FUNDS as "sourceFunds", <!-- 推广名称 -->
DISTRICT as "district", <!-- 推广区域 -->
CONTENT as "content", <!-- 推广内容 -->
PROM_CHANNEL as "promChannel",
GOAL_MARKET as "goalMarket", <!-- 目标市场 -->
GOAL_AMOUNT as "goalAmount", <!-- 目标销售额 -->
GOAL_TRAN as "goalTran", <!-- 目标转化率 -->
BUDGET as "budget", <!-- 推广预算 -->
ACTUAL_CODE as "actualCode", <!-- 实际成本 -->
ACTUAL_TRAN as "actualTran" <!-- 实际转化率 -->
FROM ${hpjxSchema}.T_HPYX010 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
SELL_DATE DESC, ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPYX010 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="sourceFunds">
SOURCE_FUNDS = #sourceFunds#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT = #district#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="content">
CONTENT = #content#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="goalMarket">
GOAL_MARKET = #goalMarket#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="goalAmount">
GOAL_AMOUNT = #goalAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="goalTran">
GOAL_TRAN = #goalTran#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="budget">
BUDGET = #budget#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCode">
ACTUAL_CODE = #actualCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualTran">
ACTUAL_TRAN = #actualTran#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX010 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SELL_DATE, <!-- 推广日期 -->
SOURCE_FUNDS, <!-- 推广名称 -->
DISTRICT, <!-- 推广区域 -->
CONTENT, <!-- 推广内容 -->
PROM_CHANNEL,
GOAL_MARKET, <!-- 目标市场 -->
GOAL_AMOUNT, <!-- 目标销售额 -->
GOAL_TRAN, <!-- 目标转化率 -->
BUDGET, <!-- 推广预算 -->
ACTUAL_CODE, <!-- 实际成本 -->
ACTUAL_TRAN <!-- 实际转化率 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #sellDate#, #sourceFunds#, #district#, #content#, #promChannel#, #goalMarket#, #goalAmount#, #goalTran#, #budget#, #actualCode#, #actualTran#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX010 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX010
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_HPYX010
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.是 -->
SELL_DATE = #sellDate#, <!-- 推广日期 -->
SOURCE_FUNDS = #sourceFunds#, <!-- 推广名称 -->
DISTRICT = #district#, <!-- 推广区域 -->
CONTENT = #content#, <!-- 推广内容 -->
PROM_CHANNEL = #promChannel#
GOAL_MARKET = #goalMarket#, <!-- 目标市场 -->
GOAL_AMOUNT = #goalAmount#, <!-- 目标销售额 -->
GOAL_TRAN = #goalTran#, <!-- 目标转化率 -->
BUDGET = #budget#, <!-- 推广预算 -->
ACTUAL_CODE = #actualCode#, <!-- 实际成本 -->
ACTUAL_TRAN = #actualTran# <!-- 实际转化率 -->
WHERE
ID = #id#
</update>
</sqlMap>
package com.baosight.hpjx.hp.yx.tools;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.yx.domain.HPYX005;
import com.baosight.hpjx.hp.yx.domain.HPYX005A;
import com.baosight.hpjx.util.AssertUtils;
import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap;
import java.util.List;
/**
* @author LiuYang
* @version 1.0 2024/9/28
* @description
*/
public class HPYXTools {
public static class HpYx005 {
/**
* 根据ID查询销售业绩
* @param id
* @return
*/
public static HPYX005 queryById(Long id) {
AssertUtils.isNull(id, "销售业绩ID,不能为空!");
List<HPYX005> results = DaoBase.getInstance().query(HPYX005.QUERY,new HashMap<String,Object>(){
{put(HPYX005.FIELD_ID,id);}
});
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
}
public static class HpYx005a {
/**
* 根据父级ID查询销售业绩明细
* @param parentId
* @return
*/
public static List<HPYX005A> queryByParentId(Long parentId) {
AssertUtils.isNull(parentId, "销售业绩ID,不能为空!");
List<HPYX005A> results = DaoBase.getInstance().query(HPYX005A.QUERY,new HashMap<String,Object>(){
{put(HPYX005A.FIELD_PARENT_ID,parentId);}
});
return results;
}
}
}
......@@ -4,12 +4,6 @@ $(function() {
$("#QUERY").on("click", function () {
query();
});
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFTab = {
"info": {
......@@ -39,7 +33,7 @@ $(function() {
let template = "";
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px"'
+ 'onclick="uploadFile(' + item.id + ',\''+YX001+'\')" >附件清单</a>';
+ ' onclick="uploadFile(' + item.id + ',\''+YX001+'\')" >附件清单</a>';
}
return template;
}
......
......@@ -105,11 +105,11 @@
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="district" cname="区域" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="productName" cname="产品名称" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!" sumType="all"/>
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="15" displayType="0.00" format="{0:N0}"
data-regex="/^-?[0-9]{1,12}$/" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数!" sumType="all"/>
<EF:EFColumn ename="price" cname="价格" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!" sumType="all"/>
<EF:EFColumn ename="quality" cname="质量" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFComboColumn ename="surveyUser" cname="调查人员" columnTemplate="#=textField#" itemTemplate="#=textField#"
......
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid = {
"result": {
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let YX005 = "YX005";
let template = "";
if (item.id) {
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="detailFunc(' + item.id + ')">详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px"'
+ ' onclick="uploadFile(' + item.id + ',\''+YX005+'\')" >附件清单</a>';
}
return template;
}
}
],
loadComplete: function(grid) {
// 此 grid 对象
$("#QUERY").on("click", function () {
grid.dataSource.page(1);
});
$("#BTN_INSERT").on("click",addFunc);
$("#BTN_UPDATE").on("click",updateFunc);
},
onAdd: function (e) {
$.each(e.items, function (index, item) {
item['sellDate'] = currShortDate()
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFunc(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
grid.closeCell();
}
})
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
function detailFunc(id) {
JSColorbox.open({
href: "HPYX005A?methodName=initLoad&id=" + id + "&efParentFormEname=HPYX005",
title: "<div style='text-align: center;'>销售详情</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
/**
* 新增
*/
function addFunc() {
JSColorbox.open({
href: "HPYX005B?methodName=initLoad&efParentFormEname=HPYX005",
title: "<div style='text-align: center;'>新增销售业绩</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
/**
* 修改
*/
function updateFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
if (rows[0].reviewStatus == "3") {
message("已经提交的数据不能进行修改!");
return;
}
JSColorbox.open({
href: "HPYX005C?methodName=initLoad&id=" + rows[0].id + "&efParentFormEname=HPYX005",
title: "<div style='text-align: center;'>修改合同</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
function btnSaveFunc(btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
let flag = true;
rows.forEach(function (item,index){
if (isBlank(item.sellDate)){
message("选中的第"+(index+1)+"行\"推广日期\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.sourceFunds)){
message("选中的第"+(index+1)+"行\"推广名称\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.goalAmount) || !isNumber(item.goalAmount)){
message("选中的第"+(index+1)+"行\"目标销售额\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.budget) || !isNumber(item.budget)){
message("选中的第"+(index+1)+"行\"推广预算\",不能为空!");
flag = false;
return false;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPYX010", "save",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
NotificationUtil(e.msg);
query();
}else {
NotificationUtil(e.msg, "error");
}
btnNode.attr("disabled", false);
}
);
}
});
}
}
/**
* 文件上传
*
* @param id 业务主键
* @param bizType 业务类型
*/
function uploadFile(id,bizType) {
JSColorbox.open({
href: "HPSB099?methodName=initLoad&inqu_status-0-matId="+id+"&inqu_status-0-bizType="+bizType,
title: "<div style='text-align: center;'>附件清单</div>",
width: "60%",
height: "50%",
//callbackName: uploadFileCallback
});
}
function windowCallback(ei) {
if (ei.getStatus() === -1) {
NotificationUtil(ei.getMsg(), "error");
return;
}
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/27
Time: 18:01
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script type="text/javascript" src="${ctx}/common/js/dayjs.min.js"></script>
<EF:EFPage title="销售业绩">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker blockId="inqu_status" row="0" ename="sellDate" cname="销售日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="clientName" cname="客户名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="sellUser" cname="销售人员" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="single">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="sellDate" cname="销售日期" width="120" enable="true" readonly="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="clientCode" cname="客户名称" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="100" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="15" displayType="0.00" format="{0:N0}"
data-regex="/^-?[0-9]{1,12}$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数" />
<EF:EFColumn ename="productCost" cname="成本" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="amount" cname="销售金额" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="sellChannel" cname="销售渠道" width="180" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn ename="sellAmount" cname="销售费用" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFComboColumn ename="sellUser" cname="销售人员" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" defaultValue="${loginName}"
maxLength="16" width="100" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="120" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="140" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid = {
"result": {
columns: [
],
loadComplete: function(grid) {
// 此 grid 对象
$("#QUERY").on("click", function () {
grid.dataSource.page(1);
});
},
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
grid.closeCell();
}
})
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/27
Time: 18:02
To change this template use File | Settings | File Templates.
--%>
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/27
Time: 18:01
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script type="text/javascript" src="${ctx}/common/js/dayjs.min.js"></script>
<EF:EFPage title="销售业绩明细">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="productName" cname="产品名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="productModel" cname="产品型号" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="productName" cname="产品名称" align="center" required="true"/>
<EF:EFColumn ename="productModel" cname="产品型号" align="center" required="true"/>
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="15" displayType="0.00" format="{0:N0}"
data-regex="/^-?[0-9]{1,12}$/" required="true" align="right" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置12位整数" />
<EF:EFColumn ename="price" cname="单价" maxLength="15" displayType="0.00" format="{0:C2}" defaultValue="0"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="productCost" cname="产品成本" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="false" align="right" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="amount" cname="销售金额" maxLength="15" displayType="0.00" format="{0:C2}" defaultValue="0"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="false" align="right" enable="false"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
$("#result-0-sellDate").val(currShortDate())
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFGrid.detail = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function(e) {
if (e.field == "quantity" || e.field == "price") {
var tr,index;
// 获取此model元素信息
for (let i = 0; i < e.items.length; i++) {
let item = e.items[i];
detailGrid.setCellValue(item, 'amount', item.quantity * item.price);
}
calculateAmount();
}
if (e.field == "productCost"){
calculateAmount();
}
});
},
onSave: function (e) {
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteResult1Func();
}
}
$("#DELETE_FILE").on("click", function () {
deleteFileFunc();
});
/**
* 下拉框事件
* @type {{"result-0-contractType": {select: IPLATUI.EFSelect.result-0-contractType.select}, projCodeBox: {select: IPLATUI.EFSelect.projCodeBox.select}}}
*/
IPLATUI.EFSelect = {
"result-0-clientCode": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var textField = "";
if (valueField) {
textField = dataItem['textField'];
$("#result-0-clientCode").val(valueField);
$("#result-0-clientName").val(textField);
}
}
}
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function btnSaveFunc() {
let flag = true;
flag = fieldValidation();
if(flag)
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("detail", "HPYX005", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
}
});
}
function deleteFileFunc() {
let rows = detail2Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
rows.forEach(function (row) {
detailGrid.removeRows([rows.rowNo]);// 刷新行号
})
refreshRowNo();
}
let refreshRowNo = function () {
let allRows = detailGrid.getDataItems();
for (let i = 0; i < allRows.length; i++) {
detailGrid.setCellValue(i, "rowNo", i);
detailGrid.refresh();
}
}
function fieldValidation() {
var sellDate = $("#result-0-sellDate").val();
if (isBlank(sellDate)) {
message("请选择销售日期!");
return false;
}
var clientCode = $("#result-0-clientCode").val();
if (isBlank(clientCode)) {
message("请选择客户名称!");
return false;
}
var sellUser = $("#result-0-sellUser").val();
if (isBlank(sellUser)) {
message("销售人员不能为空!!");
return false;
}
return true;
}
/**
* 根据单价数量计算总金额
* @param item
*/
function calculateAmount() {
var allRows = detailGrid.getDataItems();
var quantity = 0;
var productCost = 0;
var amount = 0;
allRows.forEach(function (row, index) {
quantity += parseFloat(row.quantity);
productCost += parseFloat(row.productCost);
amount += parseFloat(row.amount);
});
$("#result-0-quantity").val(quantity.toFixed(2))
$("#result-0-productCost").val(productCost.toFixed(2))
$("#result-0-amount").val(amount.toFixed(2))
}
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %><%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/28
Time: 13:31
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="新增营销业绩">
<EF:EFRegion id="inqu1" title="基本信息">
<div class="row">
<EF:EFDatePicker cname="销售日期" ename="result-0-sellDate" colWidth="4" required="true"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFSelect cname="客户名称" ename="result-0-clientCode" colWidth="4" required="true" filter="contains">
<EF:EFOption label="请选择客户" value=""/>
<EF:EFOptions blockId="customer_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-clientName" cname="产品名称" colWidth="4" readonly="true" type="hidden"/>
<EF:EFInput ename="result-0-quantity" cname="产品数量" colWidth="4" readonly="true" defaultValue="0"/>
<EF:EFInput ename="result-0-productCost" cname="成本" colWidth="4" readonly="true" defaultValue="0"/>
<EF:EFInput ename="result-0-amount" cname="销售金额" colWidth="4" readonly="true" defaultValue="0"/>
<EF:EFInput ename="result-0-sellChannel" cname="销售渠道" colWidth="4"/>
<EF:EFInput ename="result-0-sellAmount" cname="销售费用" colWidth="4" defaultValue="0"/>
<EF:EFSelect ename="result-0-sellUser" cname="销售人员" colWidth="4" filter="contains"
required="true" defaultValue="${loginName}">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail" title="记录详情">
<EF:EFGrid blockId="detail" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="productName" cname="产品名称" align="center" required="true"/>
<EF:EFColumn ename="productModel" cname="产品型号" align="center" required="true"/>
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="15" displayType="0.00" format="{0:N0}"
data-regex="/^-?[0-9]{1,12}$/" required="true" align="right" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置12位整数" />
<EF:EFColumn ename="price" cname="单价" maxLength="15" displayType="0.00" format="{0:C2}" defaultValue="0"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="productCost" cname="产品成本" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="false" align="right" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="amount" cname="销售金额" maxLength="15" displayType="0.00" format="{0:C2}" defaultValue="0"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="false" align="right" enable="false"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
<EF:EFWindow id="openFile">
<EF:EFRegion id="upload" title="文件导入区">
<div id="button"></div>
<EF:EFUpload ename="fileUpload" cname="导入" docTag="HGCW002A" path="cw"/>
</EF:EFRegion>
</EF:EFWindow>
$(function() {
$("#result-0-sellDate").val(currShortDate())
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFGrid.detail = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function(e) {
if (e.field == "quantity" || e.field == "price") {
var tr,index;
// 获取此model元素信息
for (let i = 0; i < e.items.length; i++) {
let item = e.items[i];
detailGrid.setCellValue(item, 'amount', item.quantity * item.price);
}
calculateAmount();
}
if (e.field == "productCost"){
calculateAmount();
}
});
},
onSave: function (e) {
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteResult1Func();
}
}
$("#DELETE_FILE").on("click", function () {
deleteFileFunc();
});
/**
* 下拉框事件
* @type {{"result-0-contractType": {select: IPLATUI.EFSelect.result-0-contractType.select}, projCodeBox: {select: IPLATUI.EFSelect.projCodeBox.select}}}
*/
IPLATUI.EFSelect = {
"result-0-clientCode": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var textField = "";
if (valueField) {
textField = dataItem['textField'];
$("#result-0-clientCode").val(valueField);
$("#result-0-clientName").val(textField);
}
}
}
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function btnSaveFunc() {
let flag = true;
flag = fieldValidation();
if(flag)
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("detail", "HPYX005", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
}
});
}
function deleteFileFunc() {
let rows = detail2Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
rows.forEach(function (row) {
detailGrid.removeRows([rows.rowNo]);// 刷新行号
})
refreshRowNo();
}
let refreshRowNo = function () {
let allRows = detailGrid.getDataItems();
for (let i = 0; i < allRows.length; i++) {
detailGrid.setCellValue(i, "rowNo", i);
detailGrid.refresh();
}
}
function fieldValidation() {
var sellDate = $("#result-0-sellDate").val();
if (isBlank(sellDate)) {
message("请选择销售日期!");
return false;
}
var clientCode = $("#result-0-clientCode").val();
if (isBlank(clientCode)) {
message("请选择客户名称!");
return false;
}
var sellUser = $("#result-0-sellUser").val();
if (isBlank(sellUser)) {
message("销售人员不能为空!!");
return false;
}
return true;
}
function deleteResult1Func() {
let rows = detail1Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("detail"));
EiCommunicator.send("HPYX005C", "delete", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
NotificationUtil(ei.msg);
} catch (e) {
// TODO: handle exception
}
if (IPLAT.isAvailable("detail")) {
window['detail1Grid'].setEiInfo(ei);
calculateAmount();
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
}
/**
* 根据单价数量计算总金额
* @param item
*/
function calculateAmount() {
var allRows = detailGrid.getDataItems();
var quantity = 0;
var productCost = 0;
var amount = 0;
allRows.forEach(function (row, index) {
quantity += parseFloat(row.quantity);
productCost += parseFloat(row.productCost);
amount += parseFloat(row.amount);
});
$("#result-0-quantity").val(quantity.toFixed(2))
$("#result-0-productCost").val(productCost.toFixed(2))
$("#result-0-amount").val(amount.toFixed(2))
}
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %><%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/28
Time: 13:31
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="修改营销业绩">
<EF:EFRegion id="inqu1" title="基本信息">
<div class="row">
<EF:EFInput ename="result-0-id" cname="ID" colWidth="4" readonly="true" type="hidden"/>
<EF:EFDatePicker cname="销售日期" ename="result-0-sellDate" colWidth="4" required="true"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFSelect cname="客户名称" ename="result-0-clientCode" colWidth="4" required="true" filter="contains">
<EF:EFOption label="请选择客户" value=""/>
<EF:EFOptions blockId="customer_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-clientName" cname="产品名称" colWidth="4" readonly="true" type="hidden"/>
<EF:EFInput ename="result-0-quantity" cname="产品数量" colWidth="4" readonly="true" defaultValue="0"/>
<EF:EFInput ename="result-0-productCost" cname="成本" colWidth="4" readonly="true" defaultValue="0"/>
<EF:EFInput ename="result-0-amount" cname="销售金额" colWidth="4" readonly="true" defaultValue="0"/>
<EF:EFInput ename="result-0-sellChannel" cname="销售渠道" colWidth="4"/>
<EF:EFInput ename="result-0-sellAmount" cname="销售费用" colWidth="4" defaultValue="0"/>
<EF:EFSelect ename="result-0-sellUser" cname="销售人员" colWidth="4" filter="contains"
required="true" defaultValue="${loginName}">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail" title="记录详情">
<EF:EFGrid blockId="detail" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="productName" cname="产品名称" align="center" required="true"/>
<EF:EFColumn ename="productModel" cname="产品型号" align="center" required="true"/>
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="15" displayType="0.00" format="{0:N0}"
data-regex="/^-?[0-9]{1,12}$/" required="true" align="right" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置12位整数" />
<EF:EFColumn ename="price" cname="单价" maxLength="15" displayType="0.00" format="{0:C2}" defaultValue="0"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="productCost" cname="产品成本" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="false" align="right" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="amount" cname="销售金额" maxLength="15" displayType="0.00" format="{0:C2}" defaultValue="0"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="false" align="right" enable="false"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
<EF:EFWindow id="openFile">
<EF:EFRegion id="upload" title="文件导入区">
<div id="button"></div>
<EF:EFUpload ename="fileUpload" cname="导入" docTag="HGCW002A" path="cw"/>
</EF:EFRegion>
</EF:EFWindow>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %><%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/27
Time: 14:43
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="营销资源">
<EF:EFRegion id="inqu">
<div class="row">
<EF:EFDatePicker blockId="inqu_status" row="0" ename="createdTime" cname="创建日期"
role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="createdName" cname="创建人名称" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFTab id="info">
<div title="产品资源">
<EF:EFGrid blockId="result" autoDraw="override" autoBind="false">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="productCode" cname="产品编码" width="120" enable="false" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="productName" cname="产品名称" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFComboColumn ename="productType" cname="产品类型" blockName="invent_name_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="200" required="false"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="productPecu" cname="产品特性" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="productGood" cname="产品卖点" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="productPrice" cname="产品定价" width="120" enable="true" format="{0:C2}" align="right" required="true"
maxLength="15" displayType="0.00"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!"/>
<EF:EFColumn ename="disWay" cname="折扣策略" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="productInvent" cname="产品库存" width="120" enable="true" format="{0:N0}" align="right"
maxLength="15" displayType="0.00"
data-regex="/^-?[0-9]{1,12}$/"
data-errorprompt="请输入数字,该值最大可设置12位整数!"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</div>
<div title="渠道资源">
<EF:EFGrid blockId="resultA" autoDraw="override" autoBind="false" needAuth="false" serviceName="HPYX007">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="channelCode" cname="渠道编码" width="120" enable="false" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="channelName" cname="渠道名称" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="coverDist" cname="覆盖范围" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="tarMarket" cname="目标市场" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="busPart" cname="合作伙伴" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</div>
<div title="人力资源">
<EF:EFGrid blockId="resultB" autoDraw="override" autoBind="false" needAuth="false" serviceName="HPYX008">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="name" cname="姓名" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="position" cname="职位" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="degree" cname="学历" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="profes" cname="专业" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="skill" cname="技能" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="speciality" cname="专长" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="workExpe" cname="工作经历" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</div>
<div title="营销调查">
<EF:EFGrid blockId="resultC" autoDraw="override" autoBind="false" needAuth="false" serviceName="HPYX009">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="budget" cname="预算" width="120" enable="true" format="{0:C2}" align="right"
maxLength="15" displayType="0.00" required="true"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!"/>
<EF:EFColumn ename="sourceFunds" cname="资金来源" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="distSitua" cname="分配情况" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="actualExpe" cname="实际支出" width="120" enable="true" format="{0:C2}" align="right"
maxLength="15" displayType="0.00"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</div>
</EF:EFTab>
</EF:EFPage>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid = {
"result": {
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let YX010 = "YX010";
let template = "";
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px"'
+ ' onclick="uploadFile(' + item.id + ',\''+YX010+'\')" >附件清单</a>';
}
return template;
}
}
],
loadComplete: function(grid) {
// 此 grid 对象
$("#QUERY").on("click", function () {
grid.dataSource.page(1);
});
},
onAdd: function (e) {
$.each(e.items, function (index, item) {
item['sellDate'] = currShortDate()
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFunc(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
grid.closeCell();
}
})
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
var selectedTab = 0;
let query = function () {
resultGrid.dataSource.page(1);
}
function btnSaveFunc(btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
let flag = true;
rows.forEach(function (item,index){
if (isBlank(item.sellDate)){
message("选中的第"+(index+1)+"行\"推广日期\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.sourceFunds)){
message("选中的第"+(index+1)+"行\"推广名称\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.goalAmount) || !isNumber(item.goalAmount)){
message("选中的第"+(index+1)+"行\"目标销售额\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.budget) || !isNumber(item.budget)){
message("选中的第"+(index+1)+"行\"推广预算\",不能为空!");
flag = false;
return false;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPYX010", "save",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
NotificationUtil(e.msg);
query();
}else {
NotificationUtil(e.msg, "error");
}
btnNode.attr("disabled", false);
}
);
}
});
}
}
/**
* 文件上传
*
* @param id
*/
function uploadFile(id,bizType) {
JSColorbox.open({
href: "HPSB099?methodName=initLoad&inqu_status-0-matId="+id+"&inqu_status-0-bizType="+bizType,
title: "<div style='text-align: center;'>附件清单</div>",
width: "60%",
height: "50%",
//callbackName: uploadFileCallback
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/27
Time: 18:02
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script type="text/javascript" src="${ctx}/common/js/dayjs.min.js"></script>
<EF:EFPage title="市场推广">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker blockId="inqu_status" row="0" ename="sellDate" cname="推广日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="sourceFunds" cname="推广名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="district" cname="推广区域" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="sellDate" cname="推广日期" width="120" enable="true" readonly="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="sourceFunds" cname="推广名称" width="180" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="district" cname="推广区域" width="180" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn ename="promChannel" cname="推广渠道" width="180" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn ename="content" cname="推广内容" width="180" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn ename="goalMarket" cname="目标市场" width="180" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn ename="goalAmount" cname="目标销售额" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="goalTran" cname="目标转化率" maxLength="15" displayType="0.00" format="{0:N2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="budget" cname="推广预算" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="actualCode" cname="实际成本" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="actualTran" cname="实际转化率" maxLength="15" displayType="0.00" format="{0:N2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="120" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="140" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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