部门报销单接口封装,OA调用插件方法编写

This commit is contained in:
476474485@qq.com 2025-08-19 17:05:12 +08:00
parent ac7db0b103
commit 6357fca52d
17 changed files with 2038 additions and 0 deletions

View File

@ -0,0 +1,113 @@
package com.hzya.frame.plugin.grp.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.grpU8.hbg.service.IHbgXmmlService;
import com.hzya.frame.plugin.grp.service.IBudgetPluginService;
import com.hzya.frame.plugin.grp.service.IExpensePluginService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/****
* 预算同步插件
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-08-19 15:41
* @param
* @return
**/
public class BudgetPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(BudgetPluginInitializer.class);
@Autowired
private IBudgetPluginService budgetPluginService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "BudgetPluginInitializer";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "BudgetPluginInitializer插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "BudgetPluginInitializer插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
try {
logger.info("======开始执行GRP预算同步插件======:{}",requestJson.toString());
budgetPluginService.execute(requestJson);
}catch (Exception e){
logger.error("执行GRP预算同步出错:{}",e);
}
return null;
}
}

View File

@ -0,0 +1,22 @@
package com.hzya.frame.plugin.grp.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.web.entity.JsonResultEntity;
/****
* 预算执行插件serveice
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-08-19 15:45
* @param
* @return
**/
public interface IBudgetPluginService {
/**
* 执行插件
* @param jsonObject
* @return
*/
JsonResultEntity execute(JSONObject jsonObject)throws Exception;
}

View File

@ -0,0 +1,198 @@
package com.hzya.frame.plugin.grp.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity;
import com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity;
import com.hzya.frame.grpU8.hbg.service.IHbgXmmlService;
import com.hzya.frame.plugin.grp.service.IBudgetPluginService;
import com.hzya.frame.uuid.UUIDUtils;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import java.util.ArrayList;
import java.util.List;
/***
* 预算执行插件
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-08-19 15:45
* @param
* @return
**/
public class BudgetPluginServiceImpl implements IBudgetPluginService {
Logger logger = LoggerFactory.getLogger(BudgetPluginServiceImpl.class);
@Autowired
private IHbgXmmlService hbgXmmlService;
@Value("${zt.url}")
private String interfaceUrl;
/***
* 执行逻辑插件
* @param requestJson
* @return
* @throws Exception
*/
@Override
public JsonResultEntity execute(JSONObject requestJson) throws Exception {
logger.error("部门预算同步请求参数:" + requestJson.toJSONString());
JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
if (jsonStr == null) {
return BaseResult.getFailureMessageEntity("系统错误未获取到jsonStr 请联系系统管理员");
}
JSONObject businessDataStr = jsonStr.getJSONObject("businessDataStr");
if (businessDataStr == null) {
return BaseResult.getFailureMessageEntity("系统错误未获取到businessDataStr 请联系系统管理员");
}
String affairId = jsonStr.getString("affairId");
HbgXmmlEntity hbgXmmlEntity = bangHbgXmmlEntity(businessDataStr);
return hbgXmmlService.saveXmmlAndSubmit(hbgXmmlEntity);
}
/***
* 组装GRP所需的字段,返回实体类
* @param businessDataStr
* @return
*/
private HbgXmmlEntity bangHbgXmmlEntity(JSONObject businessDataStr) {
//预算主表信息
JSONObject mainData = businessDataStr.getJSONObject("formmain_11951");
JSONArray detailArray = businessDataStr.getJSONArray("formson_11953");
HbgXmmlEntity hbgXmmlEntity = new HbgXmmlEntity();
String mainId = UUIDUtils.getUUID();
//填报人ID
hbgXmmlEntity.setTbrid(mainData.getString("fielde001"));
//填报人姓名
hbgXmmlEntity.setTbrxm(mainData.getString("fielde002"));
//填报人电话
hbgXmmlEntity.setTbrtel(mainData.getString("fielde003"));
//填报日期
hbgXmmlEntity.setTbrq(mainData.getString("fielde004"));
//主键ID
hbgXmmlEntity.setId(mainId);
//项目代码
hbgXmmlEntity.setXmdm(mainData.getString("fielde006"));
//项目名称
hbgXmmlEntity.setXmmc(mainData.getString("fielde007"));
//公司代码
hbgXmmlEntity.setGsdm(mainData.getString("fielde008"));
//会计年度
hbgXmmlEntity.setKjnd(mainData.getString("fielde009"));
//部门代码
hbgXmmlEntity.setBmdm(mainData.getString("fielde010"));
//项目负责人
hbgXmmlEntity.setXmfzr(mainData.getString("fielde011"));
//项目负责人电话
hbgXmmlEntity.setXmfzrtel(mainData.getString("fielde012"));
//项目年度
hbgXmmlEntity.setXmnd(mainData.getString("fielde013"));
//项目类别
hbgXmmlEntity.setXmlb(mainData.getString("fielde014"));
//项目申报金额
hbgXmmlEntity.setXmsbje(mainData.getDouble("fielde015"));
//项目批复金额
hbgXmmlEntity.setXmpfje(mainData.getDouble("fielde016"));
//项目申报说明
hbgXmmlEntity.setXmsbsm(mainData.getString("fielde017"));
//备注
hbgXmmlEntity.setBz(mainData.getString("fielde018"));
//是否通过标识
hbgXmmlEntity.setIsth(mainData.getString("fielde019"));
//排序ID
hbgXmmlEntity.setSortid(mainData.getInteger("fielde020"));
//是否基建考核
hbgXmmlEntity.setIsjxkh(mainData.getString("fielde021"));
//项目控制金额
hbgXmmlEntity.setXmkzje(mainData.getDouble("fielde022"));
//父级ID
hbgXmmlEntity.setPof_id(mainData.getString("fielde023"));
//状态
hbgXmmlEntity.setZt(mainData.getString("fielde024"));
//收入预算金额
hbgXmmlEntity.setSrysje(mainData.getDouble("fielde025"));
//项目分类代码
hbgXmmlEntity.setXmfldm(mainData.getString("fielde026"));
//个人代码
hbgXmmlEntity.setGrdm(mainData.getString("fielde027"));
//表类型
hbgXmmlEntity.setTblx(mainData.getInteger("fielde028"));
//经费明细
List<HbgJfbEntity> hbgJfbEntityList = new ArrayList<>();
for (int i = 0; i < detailArray.size(); i++) {
JSONObject detailsData = detailArray.getJSONObject(i);
HbgJfbEntity hbgJfbEntity = new HbgJfbEntity();
//明细表ID
String detailsId = UUIDUtils.getUUID();
//项目ID
hbgJfbEntity.setXmid(mainId);
//主键ID
hbgJfbEntity.setId(detailsId);
//部门代码
hbgJfbEntity.setBmdm(detailsData.getString("fielde029"));
//部门名称
hbgJfbEntity.setBmmc(detailsData.getString("fielde030"));
//项目代码
hbgJfbEntity.setXmdm(detailsData.getString("fielde031"));
//项目名称
hbgJfbEntity.setXmmc(detailsData.getString("fielde032"));
//公司代码
hbgJfbEntity.setGsdm(detailsData.getString("fielde034"));
//会计年度
hbgJfbEntity.setKjnd(detailsData.getString("fielde035"));
//表类型
hbgJfbEntity.setTblx(detailsData.getInteger("fielde036"));
//消耗规格参数
hbgJfbEntity.setXhggcs(detailsData.getString("fielde038"));
//审核消耗规格参数
hbgJfbEntity.setShxhggcs(detailsData.getString("fielde039"));
//系数
hbgJfbEntity.setXs(detailsData.getString("fielde040"));
//审核系数
hbgJfbEntity.setShxs(detailsData.getString("fielde041"));
//明细名称
hbgJfbEntity.setMxmc(detailsData.getString("fielde042"));
//计量单位
hbgJfbEntity.setJldw(detailsData.getString("fielde043"));
//申报数量
hbgJfbEntity.setSbsl(detailsData.getInteger("fielde044"));
//申报单价
hbgJfbEntity.setSbdebz(detailsData.getInteger("fielde045"));
//申报金额
hbgJfbEntity.setSbje(detailsData.getInteger("fielde046"));
//审核数量
hbgJfbEntity.setShsl(detailsData.getString("fielde047"));
//审核单价
hbgJfbEntity.setShdebz(detailsData.getString("fielde048"));
//审核金额
hbgJfbEntity.setShje(detailsData.getString("fielde049"));
//排序ID
hbgJfbEntity.setSortid(detailsData.getInteger("fielde050"));
//需求时间
hbgJfbEntity.setXqsj(detailsData.getString("fielde051"));
//经费日期
hbgJfbEntity.setJldate(detailsData.getString("fielde052"));
//备注
hbgJfbEntity.setBz(detailsData.getString("fielde053"));
//项目主要内容
hbgJfbEntity.setXmzynr(detailsData.getString("fielde054"));
//项目测算依据
hbgJfbEntity.setXmcsyj(detailsData.getString("fielde055"));
//指标6编码
hbgJfbEntity.setZb6(detailsData.getString("fielde056"));
//指标6名称
hbgJfbEntity.setZb6mc(detailsData.getString("fielde057"));
//指标7编码
hbgJfbEntity.setZb7(detailsData.getString("fielde058"));
//指标7名称
hbgJfbEntity.setZb7mc(detailsData.getString("fielde059"));
hbgJfbEntityList.add(hbgJfbEntity);
}
hbgXmmlEntity.setHbgJfbEntityList(hbgJfbEntityList);
return hbgXmmlEntity;
}
}

View File

@ -3,4 +3,5 @@
<beans default-autowire="byName">
<bean name="expensePluginInitializer" class="com.hzya.frame.plugin.grp.plugin.ExpensePluginInitializer" />
<bean name="lwfPluginInitializer" class="com.hzya.frame.plugin.grp.plugin.LwfPluginInitializer" />
<bean name="budgetPluginInitializer" class="com.hzya.frame.plugin.grp.plugin.BudgetPluginInitializer" />
</beans>

View File

@ -3,4 +3,5 @@
<beans default-autowire="byName">
<bean name="expensePluginServiceImpl" class="com.hzya.frame.plugin.grp.service.impl.ExpensePluginServiceImpl" />
<bean name="lwfPluginServiceImpl" class="com.hzya.frame.plugin.grp.service.impl.LwfPluginServiceImpl" />
<bean name="budgetPluginServiceImpl" class="com.hzya.frame.plugin.grp.service.impl.BudgetPluginServiceImpl" />
</beans>

View File

@ -0,0 +1,16 @@
package com.hzya.frame.grpU8.hbg.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity;
/**
* 经费表(hbg_jfb: table)表数据库访问层
*
* @author xiaoguo
* @since 2025-08-13 17:06:02
*/
public interface IHbgJfbDao extends IBaseDao<HbgJfbEntity, String> {
}

View File

@ -0,0 +1,21 @@
package com.hzya.frame.grpU8.hbg.dao;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity;
/**
* 项目目录表(hbg_xmml: table)表数据库访问层
*
* @author xiaoguo
* @since 2025-08-13 17:09:02
*/
public interface IHbgXmmlDao extends IBaseDao<HbgXmmlEntity, String> {
/**
* 部门预算经费保存并提交
* @param entity
* @return
*/
public JSONObject saveXmmlAndSubmit(HbgXmmlEntity entity);
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.grpU8.hbg.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.grpU8.hbg.dao.IHbgJfbDao;
import com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity;
import org.springframework.stereotype.Repository;
/**
* 经费表(HbgJfb)表数据库访问层
*
* @author xiaoguo
* @since 2025-08-13 17:06:04
*/
@Repository(value = "HbgJfbDaoImpl")
public class HbgJfbDaoImpl extends MybatisGenericDao<HbgJfbEntity, String> implements IHbgJfbDao{
}

View File

@ -0,0 +1,57 @@
package com.hzya.frame.grpU8.hbg.dao.impl;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.grpU8.hbg.dao.IHbgJfbDao;
import com.hzya.frame.grpU8.hbg.dao.IHbgXmmlDao;
import com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity;
import com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity;
import com.hzya.frame.grpU8.nxproof.pubobjflow.dao.IPubObjFlowDao;
import com.hzya.frame.grpU8.nxproof.pubobjflow.entity.PubObjFlowEntity;
import com.hzya.frame.uuid.UUIDUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 项目目录表(HbgXmml)表数据库访问层
*
* @author xiaoguo
* @since 2025-08-13 17:09:03
*/
@Repository(value = "HbgXmmlDaoImpl")
public class HbgXmmlDaoImpl extends MybatisGenericDao<HbgXmmlEntity, String> implements IHbgXmmlDao{
//经费表DAO
@Autowired
private IHbgJfbDao hbgJfbDao;
@Autowired
private IPubObjFlowDao flowDao;
@DS("#entity.dataSourceCode")
@Override
public JSONObject saveXmmlAndSubmit(HbgXmmlEntity entity) {
//状态为空的时候默认设置为已审核
if(StrUtil.isEmpty(entity.getZt())){
entity.setZt("2");
}
//主表ID
String id = UUIDUtils.getUUID();
entity.setId(id);
//保存 项目目录表
entity = super.save("com.hzya.frame.grpU8.hbg.dao.impl.HbgXmmlDaoImpl.entity_insert",entity);
for(HbgJfbEntity jfbEntity :entity.getHbgJfbEntityList()){
String detailId = UUIDUtils.getUUID();
jfbEntity.setId(detailId);
jfbEntity.setXmid(id);
//保存 经费明细
hbgJfbDao.save(jfbEntity);
}
//如果审批状态为2的时候需要写入审批记录表 PUB_OBJ_FLOW
if(!StrUtil.isEmpty(entity.getZt()) && "2".equalsIgnoreCase(entity.getZt())){
PubObjFlowEntity pubObjFlowEntity = new PubObjFlowEntity();
flowDao.save(pubObjFlowEntity);
}
return null;
}
}

View File

@ -0,0 +1,314 @@
package com.hzya.frame.grpU8.hbg.entity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 经费表(HBG_JFB)实体类
*
* @author makejava
* @since 2025-08-13 16:30:00
*/
public class HbgJfbEntity extends BaseEntity {
/** 部门代码 */
private String bmdm;
/** 部门名称 */
private String bmmc;
/** 项目代码 */
private String xmdm;
/** 项目名称 */
private String xmmc;
/** 主键ID */
private String id;
/** 公司代码 */
private String gsdm;
/** 会计年度 */
private String kjnd;
/** 表类型 */
private Integer tblx;
/** 项目ID */
private String xmid;
/** 消耗规格参数 */
private String xhggcs;
/** 审核消耗规格参数 */
private String shxhggcs;
/** 系数 */
private String xs;
/** 审核系数 */
private String shxs;
/** 明细名称 */
private String mxmc;
/** 计量单位 */
private String jldw;
/** 申报数量 */
private Integer sbsl;
/** 申报单价 */
private Integer sbdebz;
/** 申报金额 */
private Integer sbje;
/** 审核数量 */
private String shsl;
/** 审核单价 */
private String shdebz;
/** 审核金额 */
private String shje;
/** 排序ID */
private Integer sortid;
/** 需求时间 */
private String xqsj;
/** 经费日期 */
private String jldate;
/** 备注 */
private String bz;
/** 项目主要内容 */
private String xmzynr;
/** 项目测算依据 */
private String xmcsyj;
/** 指标6编码 */
private String zb6;
/** 指标6名称 */
private String zb6mc;
/** 指标7编码 */
private String zb7;
/** 指标7名称 */
private String zb7mc;
public String getBmdm() {
return bmdm;
}
public void setBmdm(String bmdm) {
this.bmdm = bmdm;
}
public String getBmmc() {
return bmmc;
}
public void setBmmc(String bmmc) {
this.bmmc = bmmc;
}
public String getXmdm() {
return xmdm;
}
public void setXmdm(String xmdm) {
this.xmdm = xmdm;
}
public String getXmmc() {
return xmmc;
}
public void setXmmc(String xmmc) {
this.xmmc = xmmc;
}
public String getGsdm() {
return gsdm;
}
public void setGsdm(String gsdm) {
this.gsdm = gsdm;
}
public String getKjnd() {
return kjnd;
}
public void setKjnd(String kjnd) {
this.kjnd = kjnd;
}
public Integer getTblx() {
return tblx;
}
public void setTblx(Integer tblx) {
this.tblx = tblx;
}
public String getXmid() {
return xmid;
}
public void setXmid(String xmid) {
this.xmid = xmid;
}
public String getXhggcs() {
return xhggcs;
}
public void setXhggcs(String xhggcs) {
this.xhggcs = xhggcs;
}
public String getShxhggcs() {
return shxhggcs;
}
public void setShxhggcs(String shxhggcs) {
this.shxhggcs = shxhggcs;
}
public String getXs() {
return xs;
}
public void setXs(String xs) {
this.xs = xs;
}
public String getShxs() {
return shxs;
}
public void setShxs(String shxs) {
this.shxs = shxs;
}
public String getMxmc() {
return mxmc;
}
public void setMxmc(String mxmc) {
this.mxmc = mxmc;
}
public String getJldw() {
return jldw;
}
public void setJldw(String jldw) {
this.jldw = jldw;
}
public Integer getSbsl() {
return sbsl;
}
public void setSbsl(Integer sbsl) {
this.sbsl = sbsl;
}
public Integer getSbdebz() {
return sbdebz;
}
public void setSbdebz(Integer sbdebz) {
this.sbdebz = sbdebz;
}
public Integer getSbje() {
return sbje;
}
public void setSbje(Integer sbje) {
this.sbje = sbje;
}
public String getShsl() {
return shsl;
}
public void setShsl(String shsl) {
this.shsl = shsl;
}
public String getShdebz() {
return shdebz;
}
public void setShdebz(String shdebz) {
this.shdebz = shdebz;
}
public String getShje() {
return shje;
}
public void setShje(String shje) {
this.shje = shje;
}
public Integer getSortid() {
return sortid;
}
public void setSortid(Integer sortid) {
this.sortid = sortid;
}
public String getXqsj() {
return xqsj;
}
public void setXqsj(String xqsj) {
this.xqsj = xqsj;
}
public String getJldate() {
return jldate;
}
public void setJldate(String jldate) {
this.jldate = jldate;
}
public String getBz() {
return bz;
}
public void setBz(String bz) {
this.bz = bz;
}
public String getXmzynr() {
return xmzynr;
}
public void setXmzynr(String xmzynr) {
this.xmzynr = xmzynr;
}
public String getXmcsyj() {
return xmcsyj;
}
public void setXmcsyj(String xmcsyj) {
this.xmcsyj = xmcsyj;
}
public String getZb6() {
return zb6;
}
public void setZb6(String zb6) {
this.zb6 = zb6;
}
public String getZb6mc() {
return zb6mc;
}
public void setZb6mc(String zb6mc) {
this.zb6mc = zb6mc;
}
public String getZb7() {
return zb7;
}
public void setZb7(String zb7) {
this.zb7 = zb7;
}
public String getZb7mc() {
return zb7mc;
}
public void setZb7mc(String zb7mc) {
this.zb7mc = zb7mc;
}
}

View File

@ -0,0 +1,452 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.grpU8.hbg.dao.impl.HbgJfbDaoImpl">
<resultMap id="get-HbgJfbEntity-result" type="com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity" >
<result property="bmdm" column="bmdm" jdbcType="VARCHAR"/>
<result property="bmmc" column="bmmc" jdbcType="VARCHAR"/>
<result property="xmdm" column="xmdm" jdbcType="VARCHAR"/>
<result property="xmmc" column="xmmc" jdbcType="VARCHAR"/>
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="gsdm" column="gsdm" jdbcType="VARCHAR"/>
<result property="kjnd" column="kjnd" jdbcType="VARCHAR"/>
<result property="tblx" column="tblx" jdbcType="INTEGER"/>
<result property="xmid" column="xmid" jdbcType="VARCHAR"/>
<result property="xhggcs" column="xhggcs" jdbcType="VARCHAR"/>
<result property="shxhggcs" column="shxhggcs" jdbcType="VARCHAR"/>
<result property="xs" column="xs" jdbcType="VARCHAR"/>
<result property="shxs" column="shxs" jdbcType="VARCHAR"/>
<result property="mxmc" column="mxmc" jdbcType="VARCHAR"/>
<result property="jldw" column="jldw" jdbcType="VARCHAR"/>
<result property="sbsl" column="sbsl" jdbcType="INTEGER"/>
<result property="sbdebz" column="sbdebz" jdbcType="NUMERIC"/>
<result property="sbje" column="sbje" jdbcType="NUMERIC"/>
<result property="shsl" column="shsl" jdbcType="VARCHAR"/>
<result property="shdebz" column="shdebz" jdbcType="VARCHAR"/>
<result property="shje" column="shje" jdbcType="VARCHAR"/>
<result property="sortid" column="sortid" jdbcType="INTEGER"/>
<result property="xqsj" column="xqsj" jdbcType="VARCHAR"/>
<result property="jldate" column="jldate" jdbcType="VARCHAR"/>
<result property="bz" column="bz" jdbcType="VARCHAR"/>
<result property="xmzynr" column="xmzynr" jdbcType="VARCHAR"/>
<result property="xmcsyj" column="xmcsyj" jdbcType="VARCHAR"/>
<result property="zb6" column="zb6" jdbcType="VARCHAR"/>
<result property="zb6mc" column="zb6mc" jdbcType="VARCHAR"/>
<result property="zb7" column="zb7" jdbcType="VARCHAR"/>
<result property="zb7mc" column="zb7mc" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "HbgJfbEntity_Base_Column_List">
bmdm
,bmmc
,xmdm
,xmmc
,id
,gsdm
,kjnd
,tblx
,xmid
,xhggcs
,shxhggcs
,xs
,shxs
,mxmc
,jldw
,sbsl
,sbdebz
,sbje
,shsl
,shdebz
,shje
,sortid
,xqsj
,jldate
,bz
,xmzynr
,xmcsyj
,zb6
,zb6mc
,zb7
,zb7mc
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-HbgJfbEntity-result" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity">
select
<include refid="HbgJfbEntity_Base_Column_List" />
from hbg_jfb
<trim prefix="where" prefixOverrides="and">
<if test="bmdm != null and bmdm != ''"> and bmdm = #{bmdm} </if>
<if test="bmmc != null and bmmc != ''"> and bmmc = #{bmmc} </if>
<if test="xmdm != null and xmdm != ''"> and xmdm = #{xmdm} </if>
<if test="xmmc != null and xmmc != ''"> and xmmc = #{xmmc} </if>
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="gsdm != null and gsdm != ''"> and gsdm = #{gsdm} </if>
<if test="kjnd != null and kjnd != ''"> and kjnd = #{kjnd} </if>
<if test="tblx != null"> and tblx = #{tblx} </if>
<if test="xmid != null and xmid != ''"> and xmid = #{xmid} </if>
<if test="xhggcs != null and xhggcs != ''"> and xhggcs = #{xhggcs} </if>
<if test="shxhggcs != null and shxhggcs != ''"> and shxhggcs = #{shxhggcs} </if>
<if test="xs != null and xs != ''"> and xs = #{xs} </if>
<if test="shxs != null and shxs != ''"> and shxs = #{shxs} </if>
<if test="mxmc != null and mxmc != ''"> and mxmc = #{mxmc} </if>
<if test="jldw != null and jldw != ''"> and jldw = #{jldw} </if>
<if test="sbsl != null"> and sbsl = #{sbsl} </if>
<if test="sbdebz != null"> and sbdebz = #{sbdebz} </if>
<if test="sbje != null"> and sbje = #{sbje} </if>
<if test="shsl != null and shsl != ''"> and shsl = #{shsl} </if>
<if test="shdebz != null and shdebz != ''"> and shdebz = #{shdebz} </if>
<if test="shje != null and shje != ''"> and shje = #{shje} </if>
<if test="sortid != null"> and sortid = #{sortid} </if>
<if test="xqsj != null and xqsj != ''"> and xqsj = #{xqsj} </if>
<if test="jldate != null and jldate != ''"> and jldate = #{jldate} </if>
<if test="bz != null and bz != ''"> and bz = #{bz} </if>
<if test="xmzynr != null and xmzynr != ''"> and xmzynr = #{xmzynr} </if>
<if test="xmcsyj != null and xmcsyj != ''"> and xmcsyj = #{xmcsyj} </if>
<if test="zb6 != null and zb6 != ''"> and zb6 = #{zb6} </if>
<if test="zb6mc != null and zb6mc != ''"> and zb6mc = #{zb6mc} </if>
<if test="zb7 != null and zb7 != ''"> and zb7 = #{zb7} </if>
<if test="zb7mc != null and zb7mc != ''"> and zb7mc = #{zb7mc} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity">
select count(1) from hbg_jfb
<trim prefix="where" prefixOverrides="and">
<if test="bmdm != null and bmdm != ''"> and bmdm = #{bmdm} </if>
<if test="bmmc != null and bmmc != ''"> and bmmc = #{bmmc} </if>
<if test="xmdm != null and xmdm != ''"> and xmdm = #{xmdm} </if>
<if test="xmmc != null and xmmc != ''"> and xmmc = #{xmmc} </if>
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="gsdm != null and gsdm != ''"> and gsdm = #{gsdm} </if>
<if test="kjnd != null and kjnd != ''"> and kjnd = #{kjnd} </if>
<if test="tblx != null"> and tblx = #{tblx} </if>
<if test="xmid != null and xmid != ''"> and xmid = #{xmid} </if>
<if test="xhggcs != null and xhggcs != ''"> and xhggcs = #{xhggcs} </if>
<if test="shxhggcs != null and shxhggcs != ''"> and shxhggcs = #{shxhggcs} </if>
<if test="xs != null and xs != ''"> and xs = #{xs} </if>
<if test="shxs != null and shxs != ''"> and shxs = #{shxs} </if>
<if test="mxmc != null and mxmc != ''"> and mxmc = #{mxmc} </if>
<if test="jldw != null and jldw != ''"> and jldw = #{jldw} </if>
<if test="sbsl != null"> and sbsl = #{sbsl} </if>
<if test="sbdebz != null"> and sbdebz = #{sbdebz} </if>
<if test="sbje != null"> and sbje = #{sbje} </if>
<if test="shsl != null and shsl != ''"> and shsl = #{shsl} </if>
<if test="shdebz != null and shdebz != ''"> and shdebz = #{shdebz} </if>
<if test="shje != null and shje != ''"> and shje = #{shje} </if>
<if test="sortid != null"> and sortid = #{sortid} </if>
<if test="xqsj != null and xqsj != ''"> and xqsj = #{xqsj} </if>
<if test="jldate != null and jldate != ''"> and jldate = #{jldate} </if>
<if test="bz != null and bz != ''"> and bz = #{bz} </if>
<if test="xmzynr != null and xmzynr != ''"> and xmzynr = #{xmzynr} </if>
<if test="xmcsyj != null and xmcsyj != ''"> and xmcsyj = #{xmcsyj} </if>
<if test="zb6 != null and zb6 != ''"> and zb6 = #{zb6} </if>
<if test="zb6mc != null and zb6mc != ''"> and zb6mc = #{zb6mc} </if>
<if test="zb7 != null and zb7 != ''"> and zb7 = #{zb7} </if>
<if test="zb7mc != null and zb7mc != ''"> and zb7mc = #{zb7mc} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-HbgJfbEntity-result" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity">
select
<include refid="HbgJfbEntity_Base_Column_List" />
from hbg_jfb
<trim prefix="where" prefixOverrides="and">
<if test="bmdm != null and bmdm != ''"> and bmdm like concat('%',#{bmdm},'%') </if>
<if test="bmmc != null and bmmc != ''"> and bmmc like concat('%',#{bmmc},'%') </if>
<if test="xmdm != null and xmdm != ''"> and xmdm like concat('%',#{xmdm},'%') </if>
<if test="xmmc != null and xmmc != ''"> and xmmc like concat('%',#{xmmc},'%') </if>
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="gsdm != null and gsdm != ''"> and gsdm like concat('%',#{gsdm},'%') </if>
<if test="kjnd != null and kjnd != ''"> and kjnd like concat('%',#{kjnd},'%') </if>
<if test="tblx != null"> and tblx like concat('%',#{tblx},'%') </if>
<if test="xmid != null and xmid != ''"> and xmid like concat('%',#{xmid},'%') </if>
<if test="xhggcs != null and xhggcs != ''"> and xhggcs like concat('%',#{xhggcs},'%') </if>
<if test="shxhggcs != null and shxhggcs != ''"> and shxhggcs like concat('%',#{shxhggcs},'%') </if>
<if test="xs != null and xs != ''"> and xs like concat('%',#{xs},'%') </if>
<if test="shxs != null and shxs != ''"> and shxs like concat('%',#{shxs},'%') </if>
<if test="mxmc != null and mxmc != ''"> and mxmc like concat('%',#{mxmc},'%') </if>
<if test="jldw != null and jldw != ''"> and jldw like concat('%',#{jldw},'%') </if>
<if test="sbsl != null"> and sbsl like concat('%',#{sbsl},'%') </if>
<if test="sbdebz != null"> and sbdebz like concat('%',#{sbdebz},'%') </if>
<if test="sbje != null"> and sbje like concat('%',#{sbje},'%') </if>
<if test="shsl != null and shsl != ''"> and shsl like concat('%',#{shsl},'%') </if>
<if test="shdebz != null and shdebz != ''"> and shdebz like concat('%',#{shdebz},'%') </if>
<if test="shje != null and shje != ''"> and shje like concat('%',#{shje},'%') </if>
<if test="sortid != null"> and sortid like concat('%',#{sortid},'%') </if>
<if test="xqsj != null and xqsj != ''"> and xqsj like concat('%',#{xqsj},'%') </if>
<if test="jldate != null and jldate != ''"> and jldate like concat('%',#{jldate},'%') </if>
<if test="bz != null and bz != ''"> and bz like concat('%',#{bz},'%') </if>
<if test="xmzynr != null and xmzynr != ''"> and xmzynr like concat('%',#{xmzynr},'%') </if>
<if test="xmcsyj != null and xmcsyj != ''"> and xmcsyj like concat('%',#{xmcsyj},'%') </if>
<if test="zb6 != null and zb6 != ''"> and zb6 like concat('%',#{zb6},'%') </if>
<if test="zb6mc != null and zb6mc != ''"> and zb6mc like concat('%',#{zb6mc},'%') </if>
<if test="zb7 != null and zb7 != ''"> and zb7 like concat('%',#{zb7},'%') </if>
<if test="zb7mc != null and zb7mc != ''"> and zb7mc like concat('%',#{zb7mc},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="HbgJfbentity_list_or" resultMap="get-HbgJfbEntity-result" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity">
select
<include refid="HbgJfbEntity_Base_Column_List" />
from hbg_jfb
<trim prefix="where" prefixOverrides="and">
<if test="bmdm != null and bmdm != ''"> or bmdm = #{bmdm} </if>
<if test="bmmc != null and bmmc != ''"> or bmmc = #{bmmc} </if>
<if test="xmdm != null and xmdm != ''"> or xmdm = #{xmdm} </if>
<if test="xmmc != null and xmmc != ''"> or xmmc = #{xmmc} </if>
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="gsdm != null and gsdm != ''"> or gsdm = #{gsdm} </if>
<if test="kjnd != null and kjnd != ''"> or kjnd = #{kjnd} </if>
<if test="tblx != null"> or tblx = #{tblx} </if>
<if test="xmid != null and xmid != ''"> or xmid = #{xmid} </if>
<if test="xhggcs != null and xhggcs != ''"> or xhggcs = #{xhggcs} </if>
<if test="shxhggcs != null and shxhggcs != ''"> or shxhggcs = #{shxhggcs} </if>
<if test="xs != null and xs != ''"> or xs = #{xs} </if>
<if test="shxs != null and shxs != ''"> or shxs = #{shxs} </if>
<if test="mxmc != null and mxmc != ''"> or mxmc = #{mxmc} </if>
<if test="jldw != null and jldw != ''"> or jldw = #{jldw} </if>
<if test="sbsl != null"> or sbsl = #{sbsl} </if>
<if test="sbdebz != null"> or sbdebz = #{sbdebz} </if>
<if test="sbje != null"> or sbje = #{sbje} </if>
<if test="shsl != null and shsl != ''"> or shsl = #{shsl} </if>
<if test="shdebz != null and shdebz != ''"> or shdebz = #{shdebz} </if>
<if test="shje != null and shje != ''"> or shje = #{shje} </if>
<if test="sortid != null"> or sortid = #{sortid} </if>
<if test="xqsj != null and xqsj != ''"> or xqsj = #{xqsj} </if>
<if test="jldate != null and jldate != ''"> or jldate = #{jldate} </if>
<if test="bz != null and bz != ''"> or bz = #{bz} </if>
<if test="xmzynr != null and xmzynr != ''"> or xmzynr = #{xmzynr} </if>
<if test="xmcsyj != null and xmcsyj != ''"> or xmcsyj = #{xmcsyj} </if>
<if test="zb6 != null and zb6 != ''"> or zb6 = #{zb6} </if>
<if test="zb6mc != null and zb6mc != ''"> or zb6mc = #{zb6mc} </if>
<if test="zb7 != null and zb7 != ''"> or zb7 = #{zb7} </if>
<if test="zb7mc != null and zb7mc != ''"> or zb7mc = #{zb7mc} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity" keyProperty="" useGeneratedKeys="true">
insert into hbg_jfb(
<trim suffix="" suffixOverrides=",">
<if test="bmdm != null and bmdm != ''"> bmdm , </if>
<if test="bmmc != null and bmmc != ''"> bmmc , </if>
<if test="xmdm != null and xmdm != ''"> xmdm , </if>
<if test="xmmc != null and xmmc != ''"> xmmc , </if>
<if test="id != null and id != ''"> id , </if>
<if test="gsdm != null and gsdm != ''"> gsdm , </if>
<if test="kjnd != null and kjnd != ''"> kjnd , </if>
<if test="tblx != null"> tblx , </if>
<if test="xmid != null and xmid != ''"> xmid , </if>
<if test="xhggcs != null and xhggcs != ''"> xhggcs , </if>
<if test="shxhggcs != null and shxhggcs != ''"> shxhggcs , </if>
<if test="xs != null and xs != ''"> xs , </if>
<if test="shxs != null and shxs != ''"> shxs , </if>
<if test="mxmc != null and mxmc != ''"> mxmc , </if>
<if test="jldw != null and jldw != ''"> jldw , </if>
<if test="sbsl != null"> sbsl , </if>
<if test="sbdebz != null"> sbdebz , </if>
<if test="sbje != null"> sbje , </if>
<if test="shsl != null and shsl != ''"> shsl , </if>
<if test="shdebz != null and shdebz != ''"> shdebz , </if>
<if test="shje != null and shje != ''"> shje , </if>
<if test="sortid != null"> sortid , </if>
<if test="xqsj != null and xqsj != ''"> xqsj , </if>
<if test="jldate != null and jldate != ''"> jldate , </if>
<if test="bz != null and bz != ''"> bz , </if>
<if test="xmzynr != null and xmzynr != ''"> xmzynr , </if>
<if test="xmcsyj != null and xmcsyj != ''"> xmcsyj , </if>
<if test="zb6 != null and zb6 != ''"> zb6 , </if>
<if test="zb6mc != null and zb6mc != ''"> zb6mc , </if>
<if test="zb7 != null and zb7 != ''"> zb7 , </if>
<if test="zb7mc != null and zb7mc != ''"> zb7mc , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="bmdm != null and bmdm != ''"> #{bmdm} ,</if>
<if test="bmmc != null and bmmc != ''"> #{bmmc} ,</if>
<if test="xmdm != null and xmdm != ''"> #{xmdm} ,</if>
<if test="xmmc != null and xmmc != ''"> #{xmmc} ,</if>
<if test="id != null and id != ''"> #{id} ,</if>
<if test="gsdm != null and gsdm != ''"> #{gsdm} ,</if>
<if test="kjnd != null and kjnd != ''"> #{kjnd} ,</if>
<if test="tblx != null"> #{tblx} ,</if>
<if test="xmid != null and xmid != ''"> #{xmid} ,</if>
<if test="xhggcs != null and xhggcs != ''"> #{xhggcs} ,</if>
<if test="shxhggcs != null and shxhggcs != ''"> #{shxhggcs} ,</if>
<if test="xs != null and xs != ''"> #{xs} ,</if>
<if test="shxs != null and shxs != ''"> #{shxs} ,</if>
<if test="mxmc != null and mxmc != ''"> #{mxmc} ,</if>
<if test="jldw != null and jldw != ''"> #{jldw} ,</if>
<if test="sbsl != null"> #{sbsl} ,</if>
<if test="sbdebz != null"> #{sbdebz} ,</if>
<if test="sbje != null"> #{sbje} ,</if>
<if test="shsl != null and shsl != ''"> #{shsl} ,</if>
<if test="shdebz != null and shdebz != ''"> #{shdebz} ,</if>
<if test="shje != null and shje != ''"> #{shje} ,</if>
<if test="sortid != null"> #{sortid} ,</if>
<if test="xqsj != null and xqsj != ''"> #{xqsj} ,</if>
<if test="jldate != null and jldate != ''"> #{jldate} ,</if>
<if test="bz != null and bz != ''"> #{bz} ,</if>
<if test="xmzynr != null and xmzynr != ''"> #{xmzynr} ,</if>
<if test="xmcsyj != null and xmcsyj != ''"> #{xmcsyj} ,</if>
<if test="zb6 != null and zb6 != ''"> #{zb6} ,</if>
<if test="zb6mc != null and zb6mc != ''"> #{zb6mc} ,</if>
<if test="zb7 != null and zb7 != ''"> #{zb7} ,</if>
<if test="zb7mc != null and zb7mc != ''"> #{zb7mc} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from hbg_jfb a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="" useGeneratedKeys="true">
insert into hbg_jfb(bmdm, bmmc, xmdm, xmmc, id, gsdm, kjnd, tblx, xmid, xhggcs, shxhggcs, xs, shxs, mxmc, jldw, sbsl, sbdebz, sbje, shsl, shdebz, shje, sortid, xqsj, jldate, bz, xmzynr, xmcsyj, zb6, zb6mc, zb7, zb7mc, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.bmdm},#{entity.bmmc},#{entity.xmdm},#{entity.xmmc},#{entity.id},#{entity.gsdm},#{entity.kjnd},#{entity.tblx},#{entity.xmid},#{entity.xhggcs},#{entity.shxhggcs},#{entity.xs},#{entity.shxs},#{entity.mxmc},#{entity.jldw},#{entity.sbsl},#{entity.sbdebz},#{entity.sbje},#{entity.shsl},#{entity.shdebz},#{entity.shje},#{entity.sortid},#{entity.xqsj},#{entity.jldate},#{entity.bz},#{entity.xmzynr},#{entity.xmcsyj},#{entity.zb6},#{entity.zb6mc},#{entity.zb7},#{entity.zb7mc}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="" useGeneratedKeys="true">
insert into hbg_jfb(bmdm, bmmc, xmdm, xmmc, id, gsdm, kjnd, tblx, xmid, xhggcs, shxhggcs, xs, shxs, mxmc, jldw, sbsl, sbdebz, sbje, shsl, shdebz, shje, sortid, xqsj, jldate, bz, xmzynr, xmcsyj, zb6, zb6mc, zb7, zb7mc)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.bmdm},#{entity.bmmc},#{entity.xmdm},#{entity.xmmc},#{entity.id},#{entity.gsdm},#{entity.kjnd},#{entity.tblx},#{entity.xmid},#{entity.xhggcs},#{entity.shxhggcs},#{entity.xs},#{entity.shxs},#{entity.mxmc},#{entity.jldw},#{entity.sbsl},#{entity.sbdebz},#{entity.sbje},#{entity.shsl},#{entity.shdebz},#{entity.shje},#{entity.sortid},#{entity.xqsj},#{entity.jldate},#{entity.bz},#{entity.xmzynr},#{entity.xmcsyj},#{entity.zb6},#{entity.zb6mc},#{entity.zb7},#{entity.zb7mc})
</foreach>
on duplicate key update
bmdm = values(bmdm),
bmmc = values(bmmc),
xmdm = values(xmdm),
xmmc = values(xmmc),
id = values(id),
gsdm = values(gsdm),
kjnd = values(kjnd),
tblx = values(tblx),
xmid = values(xmid),
xhggcs = values(xhggcs),
shxhggcs = values(shxhggcs),
xs = values(xs),
shxs = values(shxs),
mxmc = values(mxmc),
jldw = values(jldw),
sbsl = values(sbsl),
sbdebz = values(sbdebz),
sbje = values(sbje),
shsl = values(shsl),
shdebz = values(shdebz),
shje = values(shje),
sortid = values(sortid),
xqsj = values(xqsj),
jldate = values(jldate),
bz = values(bz),
xmzynr = values(xmzynr),
xmcsyj = values(xmcsyj),
zb6 = values(zb6),
zb6mc = values(zb6mc),
zb7 = values(zb7),
zb7mc = values(zb7mc)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity" >
update hbg_jfb set
<trim suffix="" suffixOverrides=",">
<if test="bmdm != null and bmdm != ''"> bmdm = #{bmdm},</if>
<if test="bmmc != null and bmmc != ''"> bmmc = #{bmmc},</if>
<if test="xmdm != null and xmdm != ''"> xmdm = #{xmdm},</if>
<if test="xmmc != null and xmmc != ''"> xmmc = #{xmmc},</if>
<if test="id != null and id != ''"> id = #{id},</if>
<if test="gsdm != null and gsdm != ''"> gsdm = #{gsdm},</if>
<if test="kjnd != null and kjnd != ''"> kjnd = #{kjnd},</if>
<if test="tblx != null"> tblx = #{tblx},</if>
<if test="xmid != null and xmid != ''"> xmid = #{xmid},</if>
<if test="xhggcs != null and xhggcs != ''"> xhggcs = #{xhggcs},</if>
<if test="shxhggcs != null and shxhggcs != ''"> shxhggcs = #{shxhggcs},</if>
<if test="xs != null and xs != ''"> xs = #{xs},</if>
<if test="shxs != null and shxs != ''"> shxs = #{shxs},</if>
<if test="mxmc != null and mxmc != ''"> mxmc = #{mxmc},</if>
<if test="jldw != null and jldw != ''"> jldw = #{jldw},</if>
<if test="sbsl != null"> sbsl = #{sbsl},</if>
<if test="sbdebz != null"> sbdebz = #{sbdebz},</if>
<if test="sbje != null"> sbje = #{sbje},</if>
<if test="shsl != null and shsl != ''"> shsl = #{shsl},</if>
<if test="shdebz != null and shdebz != ''"> shdebz = #{shdebz},</if>
<if test="shje != null and shje != ''"> shje = #{shje},</if>
<if test="sortid != null"> sortid = #{sortid},</if>
<if test="xqsj != null and xqsj != ''"> xqsj = #{xqsj},</if>
<if test="jldate != null and jldate != ''"> jldate = #{jldate},</if>
<if test="bz != null and bz != ''"> bz = #{bz},</if>
<if test="xmzynr != null and xmzynr != ''"> xmzynr = #{xmzynr},</if>
<if test="xmcsyj != null and xmcsyj != ''"> xmcsyj = #{xmcsyj},</if>
<if test="zb6 != null and zb6 != ''"> zb6 = #{zb6},</if>
<if test="zb6mc != null and zb6mc != ''"> zb6mc = #{zb6mc},</if>
<if test="zb7 != null and zb7 != ''"> zb7 = #{zb7},</if>
<if test="zb7mc != null and zb7mc != ''"> zb7mc = #{zb7mc},</if>
</trim>
where = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity" >
update hbg_jfb set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity" >
update hbg_jfb set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="bmdm != null and bmdm != ''"> and bmdm = #{bmdm} </if>
<if test="bmmc != null and bmmc != ''"> and bmmc = #{bmmc} </if>
<if test="xmdm != null and xmdm != ''"> and xmdm = #{xmdm} </if>
<if test="xmmc != null and xmmc != ''"> and xmmc = #{xmmc} </if>
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="gsdm != null and gsdm != ''"> and gsdm = #{gsdm} </if>
<if test="kjnd != null and kjnd != ''"> and kjnd = #{kjnd} </if>
<if test="tblx != null"> and tblx = #{tblx} </if>
<if test="xmid != null and xmid != ''"> and xmid = #{xmid} </if>
<if test="xhggcs != null and xhggcs != ''"> and xhggcs = #{xhggcs} </if>
<if test="shxhggcs != null and shxhggcs != ''"> and shxhggcs = #{shxhggcs} </if>
<if test="xs != null and xs != ''"> and xs = #{xs} </if>
<if test="shxs != null and shxs != ''"> and shxs = #{shxs} </if>
<if test="mxmc != null and mxmc != ''"> and mxmc = #{mxmc} </if>
<if test="jldw != null and jldw != ''"> and jldw = #{jldw} </if>
<if test="sbsl != null"> and sbsl = #{sbsl} </if>
<if test="sbdebz != null"> and sbdebz = #{sbdebz} </if>
<if test="sbje != null"> and sbje = #{sbje} </if>
<if test="shsl != null and shsl != ''"> and shsl = #{shsl} </if>
<if test="shdebz != null and shdebz != ''"> and shdebz = #{shdebz} </if>
<if test="shje != null and shje != ''"> and shje = #{shje} </if>
<if test="sortid != null"> and sortid = #{sortid} </if>
<if test="xqsj != null and xqsj != ''"> and xqsj = #{xqsj} </if>
<if test="jldate != null and jldate != ''"> and jldate = #{jldate} </if>
<if test="bz != null and bz != ''"> and bz = #{bz} </if>
<if test="xmzynr != null and xmzynr != ''"> and xmzynr = #{xmzynr} </if>
<if test="xmcsyj != null and xmcsyj != ''"> and xmcsyj = #{xmcsyj} </if>
<if test="zb6 != null and zb6 != ''"> and zb6 = #{zb6} </if>
<if test="zb6mc != null and zb6mc != ''"> and zb6mc = #{zb6mc} </if>
<if test="zb7 != null and zb7 != ''"> and zb7 = #{zb7} </if>
<if test="zb7mc != null and zb7mc != ''"> and zb7mc = #{zb7mc} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from hbg_jfb where = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,298 @@
package com.hzya.frame.grpU8.hbg.entity;
import com.hzya.frame.web.entity.BaseEntity;
import java.util.List;
/**
* 项目目录表(HBG_XMML)实体类
*
* @author makejava
* @since 2025-08-13 15:30:00
*/
public class HbgXmmlEntity extends BaseEntity {
// 审核 ISTH = '0', POF_ID = '3818A845-6DCC-4BE9-AAFC-D644A69806E0', ZT = 2 update HBG_XMML set ISTH = '0', POF_ID = '3818A845-6DCC-4BE9-AAFC-D644A69806E0', ZT = 2 where ID = 'F666A891-2812-4343-8B1B-24FCA698B641' and GSDM = '001' and KJND = '2025';
/** 填报人ID */
private String tbrid;
/** 填报人姓名 */
private String tbrxm;
/** 填报人电话 */
private String tbrtel;
/** 填报日期 */
private String tbrq;
/** 主键ID */
private String id;
/** 项目代码 */
private String xmdm;
/** 项目名称 */
private String xmmc;
/** 公司代码 */
private String gsdm;
/** 会计年度 */
private String kjnd;
/** 部门代码 */
private String bmdm;
/** 项目负责人 */
private String xmfzr;
/** 项目负责人电话 */
private String xmfzrtel;
/** 项目年度 */
private String xmnd;
/** 项目类别 */
private String xmlb;
/** 项目申报金额 */
private Double xmsbje;
/** 项目批复金额 */
private Double xmpfje;
/** 项目申报说明 */
private String xmsbsm;
/** 备注 */
private String bz;
/** 是否通过(标识) */
private String isth;
/** 排序ID */
private Integer sortid;
/** 是否基建考核 */
private String isjxkh;
/** 项目控制金额 */
private Double xmkzje;
/** 父级ID */
private String pof_id;
/** 状态 */
private String zt;
/** 收入预算金额 */
private Double srysje;
/** 项目分类代码 */
private String xmfldm;
/** 个人代码 */
private String grdm;
/** 表类型 */
private Integer tblx;
//经费明细
private List<HbgJfbEntity> hbgJfbEntityList;
public String getTbrid() {
return tbrid;
}
public void setTbrid(String tbrid) {
this.tbrid = tbrid;
}
public String getTbrxm() {
return tbrxm;
}
public void setTbrxm(String tbrxm) {
this.tbrxm = tbrxm;
}
public String getTbrtel() {
return tbrtel;
}
public void setTbrtel(String tbrtel) {
this.tbrtel = tbrtel;
}
public String getTbrq() {
return tbrq;
}
public void setTbrq(String tbrq) {
this.tbrq = tbrq;
}
public String getXmdm() {
return xmdm;
}
public void setXmdm(String xmdm) {
this.xmdm = xmdm;
}
public String getXmmc() {
return xmmc;
}
public void setXmmc(String xmmc) {
this.xmmc = xmmc;
}
public String getGsdm() {
return gsdm;
}
public void setGsdm(String gsdm) {
this.gsdm = gsdm;
}
public String getKjnd() {
return kjnd;
}
public void setKjnd(String kjnd) {
this.kjnd = kjnd;
}
public String getBmdm() {
return bmdm;
}
public void setBmdm(String bmdm) {
this.bmdm = bmdm;
}
public String getXmfzr() {
return xmfzr;
}
public void setXmfzr(String xmfzr) {
this.xmfzr = xmfzr;
}
public String getXmfzrtel() {
return xmfzrtel;
}
public void setXmfzrtel(String xmfzrtel) {
this.xmfzrtel = xmfzrtel;
}
public String getXmnd() {
return xmnd;
}
public void setXmnd(String xmnd) {
this.xmnd = xmnd;
}
public String getXmlb() {
return xmlb;
}
public void setXmlb(String xmlb) {
this.xmlb = xmlb;
}
public Double getXmsbje() {
return xmsbje;
}
public void setXmsbje(Double xmsbje) {
this.xmsbje = xmsbje;
}
public Double getXmpfje() {
return xmpfje;
}
public void setXmpfje(Double xmpfje) {
this.xmpfje = xmpfje;
}
public String getXmsbsm() {
return xmsbsm;
}
public void setXmsbsm(String xmsbsm) {
this.xmsbsm = xmsbsm;
}
public String getBz() {
return bz;
}
public void setBz(String bz) {
this.bz = bz;
}
public String getIsth() {
return isth;
}
public void setIsth(String isth) {
this.isth = isth;
}
public Integer getSortid() {
return sortid;
}
public void setSortid(Integer sortid) {
this.sortid = sortid;
}
public String getIsjxkh() {
return isjxkh;
}
public void setIsjxkh(String isjxkh) {
this.isjxkh = isjxkh;
}
public Double getXmkzje() {
return xmkzje;
}
public void setXmkzje(Double xmkzje) {
this.xmkzje = xmkzje;
}
public String getPof_id() {
return pof_id;
}
public void setPof_id(String pof_id) {
this.pof_id = pof_id;
}
public String getZt() {
return zt;
}
public void setZt(String zt) {
this.zt = zt;
}
public Double getSrysje() {
return srysje;
}
public void setSrysje(Double srysje) {
this.srysje = srysje;
}
public String getXmfldm() {
return xmfldm;
}
public void setXmfldm(String xmfldm) {
this.xmfldm = xmfldm;
}
public String getGrdm() {
return grdm;
}
public void setGrdm(String grdm) {
this.grdm = grdm;
}
public Integer getTblx() {
return tblx;
}
public void setTblx(Integer tblx) {
this.tblx = tblx;
}
public List<HbgJfbEntity> getHbgJfbEntityList() {
return hbgJfbEntityList;
}
public void setHbgJfbEntityList(List<HbgJfbEntity> hbgJfbEntityList) {
this.hbgJfbEntityList = hbgJfbEntityList;
}
}

View File

@ -0,0 +1,419 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.grpU8.hbg.dao.impl.HbgXmmlDaoImpl">
<resultMap id="get-HbgXmmlEntity-result" type="com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity" >
<result property="tbrid" column="tbrid" jdbcType="VARCHAR"/>
<result property="tbrxm" column="tbrxm" jdbcType="VARCHAR"/>
<result property="tbrtel" column="tbrtel" jdbcType="VARCHAR"/>
<result property="tbrq" column="tbrq" jdbcType="VARCHAR"/>
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="xmdm" column="xmdm" jdbcType="VARCHAR"/>
<result property="xmmc" column="xmmc" jdbcType="VARCHAR"/>
<result property="gsdm" column="gsdm" jdbcType="VARCHAR"/>
<result property="kjnd" column="kjnd" jdbcType="VARCHAR"/>
<result property="bmdm" column="bmdm" jdbcType="VARCHAR"/>
<result property="xmfzr" column="xmfzr" jdbcType="VARCHAR"/>
<result property="xmfzrtel" column="xmfzrtel" jdbcType="VARCHAR"/>
<result property="xmnd" column="xmnd" jdbcType="VARCHAR"/>
<result property="xmlb" column="xmlb" jdbcType="VARCHAR"/>
<result property="xmsbje" column="xmsbje" jdbcType="NUMERIC"/>
<result property="xmpfje" column="xmpfje" jdbcType="NUMERIC"/>
<result property="xmsbsm" column="xmsbsm" jdbcType="VARCHAR"/>
<result property="bz" column="bz" jdbcType="VARCHAR"/>
<result property="isth" column="isth" jdbcType="VARCHAR"/>
<result property="sortid" column="sortid" jdbcType="INTEGER"/>
<result property="isjxkh" column="isjxkh" jdbcType="VARCHAR"/>
<result property="xmkzje" column="xmkzje" jdbcType="NUMERIC"/>
<result property="pof_id" column="pof_id" jdbcType="VARCHAR"/>
<result property="zt" column="zt" jdbcType="INTEGER"/>
<result property="srysje" column="srysje" jdbcType="NUMERIC"/>
<result property="xmfldm" column="xmfldm" jdbcType="VARCHAR"/>
<result property="grdm" column="grdm" jdbcType="VARCHAR"/>
<result property="tblx" column="tblx" jdbcType="INTEGER"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "HbgXmmlEntity_Base_Column_List">
tbrid
,tbrxm
,tbrtel
,tbrq
,id
,xmdm
,xmmc
,gsdm
,kjnd
,bmdm
,xmfzr
,xmfzrtel
,xmnd
,xmlb
,xmsbje
,xmpfje
,xmsbsm
,bz
,isth
,sortid
,isjxkh
,xmkzje
,pof_id
,zt
,srysje
,xmfldm
,grdm
,tblx
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-HbgXmmlEntity-result" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity">
select
<include refid="HbgXmmlEntity_Base_Column_List" />
from hbg_xmml
<trim prefix="where" prefixOverrides="and">
<if test="tbrid != null and tbrid != ''"> and tbrid = #{tbrid} </if>
<if test="tbrxm != null and tbrxm != ''"> and tbrxm = #{tbrxm} </if>
<if test="tbrtel != null and tbrtel != ''"> and tbrtel = #{tbrtel} </if>
<if test="tbrq != null and tbrq != ''"> and tbrq = #{tbrq} </if>
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="xmdm != null and xmdm != ''"> and xmdm = #{xmdm} </if>
<if test="xmmc != null and xmmc != ''"> and xmmc = #{xmmc} </if>
<if test="gsdm != null and gsdm != ''"> and gsdm = #{gsdm} </if>
<if test="kjnd != null and kjnd != ''"> and kjnd = #{kjnd} </if>
<if test="bmdm != null and bmdm != ''"> and bmdm = #{bmdm} </if>
<if test="xmfzr != null and xmfzr != ''"> and xmfzr = #{xmfzr} </if>
<if test="xmfzrtel != null and xmfzrtel != ''"> and xmfzrtel = #{xmfzrtel} </if>
<if test="xmnd != null and xmnd != ''"> and xmnd = #{xmnd} </if>
<if test="xmlb != null and xmlb != ''"> and xmlb = #{xmlb} </if>
<if test="xmsbje != null"> and xmsbje = #{xmsbje} </if>
<if test="xmpfje != null"> and xmpfje = #{xmpfje} </if>
<if test="xmsbsm != null and xmsbsm != ''"> and xmsbsm = #{xmsbsm} </if>
<if test="bz != null and bz != ''"> and bz = #{bz} </if>
<if test="isth != null and isth != ''"> and isth = #{isth} </if>
<if test="sortid != null"> and sortid = #{sortid} </if>
<if test="isjxkh != null and isjxkh != ''"> and isjxkh = #{isjxkh} </if>
<if test="xmkzje != null"> and xmkzje = #{xmkzje} </if>
<if test="pof_id != null and pof_id != ''"> and pof_id = #{pof_id} </if>
<if test="zt != null"> and zt = #{zt} </if>
<if test="srysje != null"> and srysje = #{srysje} </if>
<if test="xmfldm != null and xmfldm != ''"> and xmfldm = #{xmfldm} </if>
<if test="grdm != null and grdm != ''"> and grdm = #{grdm} </if>
<if test="tblx != null"> and tblx = #{tblx} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity">
select count(1) from hbg_xmml
<trim prefix="where" prefixOverrides="and">
<if test="tbrid != null and tbrid != ''"> and tbrid = #{tbrid} </if>
<if test="tbrxm != null and tbrxm != ''"> and tbrxm = #{tbrxm} </if>
<if test="tbrtel != null and tbrtel != ''"> and tbrtel = #{tbrtel} </if>
<if test="tbrq != null and tbrq != ''"> and tbrq = #{tbrq} </if>
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="xmdm != null and xmdm != ''"> and xmdm = #{xmdm} </if>
<if test="xmmc != null and xmmc != ''"> and xmmc = #{xmmc} </if>
<if test="gsdm != null and gsdm != ''"> and gsdm = #{gsdm} </if>
<if test="kjnd != null and kjnd != ''"> and kjnd = #{kjnd} </if>
<if test="bmdm != null and bmdm != ''"> and bmdm = #{bmdm} </if>
<if test="xmfzr != null and xmfzr != ''"> and xmfzr = #{xmfzr} </if>
<if test="xmfzrtel != null and xmfzrtel != ''"> and xmfzrtel = #{xmfzrtel} </if>
<if test="xmnd != null and xmnd != ''"> and xmnd = #{xmnd} </if>
<if test="xmlb != null and xmlb != ''"> and xmlb = #{xmlb} </if>
<if test="xmsbje != null"> and xmsbje = #{xmsbje} </if>
<if test="xmpfje != null"> and xmpfje = #{xmpfje} </if>
<if test="xmsbsm != null and xmsbsm != ''"> and xmsbsm = #{xmsbsm} </if>
<if test="bz != null and bz != ''"> and bz = #{bz} </if>
<if test="isth != null and isth != ''"> and isth = #{isth} </if>
<if test="sortid != null"> and sortid = #{sortid} </if>
<if test="isjxkh != null and isjxkh != ''"> and isjxkh = #{isjxkh} </if>
<if test="xmkzje != null"> and xmkzje = #{xmkzje} </if>
<if test="pof_id != null and pof_id != ''"> and pof_id = #{pof_id} </if>
<if test="zt != null"> and zt = #{zt} </if>
<if test="srysje != null"> and srysje = #{srysje} </if>
<if test="xmfldm != null and xmfldm != ''"> and xmfldm = #{xmfldm} </if>
<if test="grdm != null and grdm != ''"> and grdm = #{grdm} </if>
<if test="tblx != null"> and tblx = #{tblx} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-HbgXmmlEntity-result" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity">
select
<include refid="HbgXmmlEntity_Base_Column_List" />
from hbg_xmml
<trim prefix="where" prefixOverrides="and">
<if test="tbrid != null and tbrid != ''"> and tbrid like concat('%',#{tbrid},'%') </if>
<if test="tbrxm != null and tbrxm != ''"> and tbrxm like concat('%',#{tbrxm},'%') </if>
<if test="tbrtel != null and tbrtel != ''"> and tbrtel like concat('%',#{tbrtel},'%') </if>
<if test="tbrq != null and tbrq != ''"> and tbrq like concat('%',#{tbrq},'%') </if>
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="xmdm != null and xmdm != ''"> and xmdm like concat('%',#{xmdm},'%') </if>
<if test="xmmc != null and xmmc != ''"> and xmmc like concat('%',#{xmmc},'%') </if>
<if test="gsdm != null and gsdm != ''"> and gsdm like concat('%',#{gsdm},'%') </if>
<if test="kjnd != null and kjnd != ''"> and kjnd like concat('%',#{kjnd},'%') </if>
<if test="bmdm != null and bmdm != ''"> and bmdm like concat('%',#{bmdm},'%') </if>
<if test="xmfzr != null and xmfzr != ''"> and xmfzr like concat('%',#{xmfzr},'%') </if>
<if test="xmfzrtel != null and xmfzrtel != ''"> and xmfzrtel like concat('%',#{xmfzrtel},'%') </if>
<if test="xmnd != null and xmnd != ''"> and xmnd like concat('%',#{xmnd},'%') </if>
<if test="xmlb != null and xmlb != ''"> and xmlb like concat('%',#{xmlb},'%') </if>
<if test="xmsbje != null"> and xmsbje like concat('%',#{xmsbje},'%') </if>
<if test="xmpfje != null"> and xmpfje like concat('%',#{xmpfje},'%') </if>
<if test="xmsbsm != null and xmsbsm != ''"> and xmsbsm like concat('%',#{xmsbsm},'%') </if>
<if test="bz != null and bz != ''"> and bz like concat('%',#{bz},'%') </if>
<if test="isth != null and isth != ''"> and isth like concat('%',#{isth},'%') </if>
<if test="sortid != null"> and sortid like concat('%',#{sortid},'%') </if>
<if test="isjxkh != null and isjxkh != ''"> and isjxkh like concat('%',#{isjxkh},'%') </if>
<if test="xmkzje != null"> and xmkzje like concat('%',#{xmkzje},'%') </if>
<if test="pof_id != null and pof_id != ''"> and pof_id like concat('%',#{pof_id},'%') </if>
<if test="zt != null"> and zt like concat('%',#{zt},'%') </if>
<if test="srysje != null"> and srysje like concat('%',#{srysje},'%') </if>
<if test="xmfldm != null and xmfldm != ''"> and xmfldm like concat('%',#{xmfldm},'%') </if>
<if test="grdm != null and grdm != ''"> and grdm like concat('%',#{grdm},'%') </if>
<if test="tblx != null"> and tblx like concat('%',#{tblx},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="HbgXmmlentity_list_or" resultMap="get-HbgXmmlEntity-result" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity">
select
<include refid="HbgXmmlEntity_Base_Column_List" />
from hbg_xmml
<trim prefix="where" prefixOverrides="and">
<if test="tbrid != null and tbrid != ''"> or tbrid = #{tbrid} </if>
<if test="tbrxm != null and tbrxm != ''"> or tbrxm = #{tbrxm} </if>
<if test="tbrtel != null and tbrtel != ''"> or tbrtel = #{tbrtel} </if>
<if test="tbrq != null and tbrq != ''"> or tbrq = #{tbrq} </if>
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="xmdm != null and xmdm != ''"> or xmdm = #{xmdm} </if>
<if test="xmmc != null and xmmc != ''"> or xmmc = #{xmmc} </if>
<if test="gsdm != null and gsdm != ''"> or gsdm = #{gsdm} </if>
<if test="kjnd != null and kjnd != ''"> or kjnd = #{kjnd} </if>
<if test="bmdm != null and bmdm != ''"> or bmdm = #{bmdm} </if>
<if test="xmfzr != null and xmfzr != ''"> or xmfzr = #{xmfzr} </if>
<if test="xmfzrtel != null and xmfzrtel != ''"> or xmfzrtel = #{xmfzrtel} </if>
<if test="xmnd != null and xmnd != ''"> or xmnd = #{xmnd} </if>
<if test="xmlb != null and xmlb != ''"> or xmlb = #{xmlb} </if>
<if test="xmsbje != null"> or xmsbje = #{xmsbje} </if>
<if test="xmpfje != null"> or xmpfje = #{xmpfje} </if>
<if test="xmsbsm != null and xmsbsm != ''"> or xmsbsm = #{xmsbsm} </if>
<if test="bz != null and bz != ''"> or bz = #{bz} </if>
<if test="isth != null and isth != ''"> or isth = #{isth} </if>
<if test="sortid != null"> or sortid = #{sortid} </if>
<if test="isjxkh != null and isjxkh != ''"> or isjxkh = #{isjxkh} </if>
<if test="xmkzje != null"> or xmkzje = #{xmkzje} </if>
<if test="pof_id != null and pof_id != ''"> or pof_id = #{pof_id} </if>
<if test="zt != null"> or zt = #{zt} </if>
<if test="srysje != null"> or srysje = #{srysje} </if>
<if test="xmfldm != null and xmfldm != ''"> or xmfldm = #{xmfldm} </if>
<if test="grdm != null and grdm != ''"> or grdm = #{grdm} </if>
<if test="tblx != null"> or tblx = #{tblx} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity" keyProperty="" useGeneratedKeys="true">
insert into hbg_xmml(
<trim suffix="" suffixOverrides=",">
<if test="tbrid != null and tbrid != ''"> tbrid , </if>
<if test="tbrxm != null and tbrxm != ''"> tbrxm , </if>
<if test="tbrtel != null and tbrtel != ''"> tbrtel , </if>
<if test="tbrq != null and tbrq != ''"> tbrq , </if>
<if test="id != null and id != ''"> id , </if>
<if test="xmdm != null and xmdm != ''"> xmdm , </if>
<if test="xmmc != null and xmmc != ''"> xmmc , </if>
<if test="gsdm != null and gsdm != ''"> gsdm , </if>
<if test="kjnd != null and kjnd != ''"> kjnd , </if>
<if test="bmdm != null and bmdm != ''"> bmdm , </if>
<if test="xmfzr != null and xmfzr != ''"> xmfzr , </if>
<if test="xmfzrtel != null and xmfzrtel != ''"> xmfzrtel , </if>
<if test="xmnd != null and xmnd != ''"> xmnd , </if>
<if test="xmlb != null and xmlb != ''"> xmlb , </if>
<if test="xmsbje != null"> xmsbje , </if>
<if test="xmpfje != null"> xmpfje , </if>
<if test="xmsbsm != null and xmsbsm != ''"> xmsbsm , </if>
<if test="bz != null and bz != ''"> bz , </if>
<if test="isth != null and isth != ''"> isth , </if>
<if test="sortid != null"> sortid , </if>
<if test="isjxkh != null and isjxkh != ''"> isjxkh , </if>
<if test="xmkzje != null"> xmkzje , </if>
<if test="pof_id != null and pof_id != ''"> pof_id , </if>
<if test="zt != null"> zt , </if>
<if test="srysje != null"> srysje , </if>
<if test="xmfldm != null and xmfldm != ''"> xmfldm , </if>
<if test="grdm != null and grdm != ''"> grdm , </if>
<if test="tblx != null"> tblx , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="tbrid != null and tbrid != ''"> #{tbrid} ,</if>
<if test="tbrxm != null and tbrxm != ''"> #{tbrxm} ,</if>
<if test="tbrtel != null and tbrtel != ''"> #{tbrtel} ,</if>
<if test="tbrq != null and tbrq != ''"> #{tbrq} ,</if>
<if test="id != null and id != ''"> #{id} ,</if>
<if test="xmdm != null and xmdm != ''"> #{xmdm} ,</if>
<if test="xmmc != null and xmmc != ''"> #{xmmc} ,</if>
<if test="gsdm != null and gsdm != ''"> #{gsdm} ,</if>
<if test="kjnd != null and kjnd != ''"> #{kjnd} ,</if>
<if test="bmdm != null and bmdm != ''"> #{bmdm} ,</if>
<if test="xmfzr != null and xmfzr != ''"> #{xmfzr} ,</if>
<if test="xmfzrtel != null and xmfzrtel != ''"> #{xmfzrtel} ,</if>
<if test="xmnd != null and xmnd != ''"> #{xmnd} ,</if>
<if test="xmlb != null and xmlb != ''"> #{xmlb} ,</if>
<if test="xmsbje != null"> #{xmsbje} ,</if>
<if test="xmpfje != null"> #{xmpfje} ,</if>
<if test="xmsbsm != null and xmsbsm != ''"> #{xmsbsm} ,</if>
<if test="bz != null and bz != ''"> #{bz} ,</if>
<if test="isth != null and isth != ''"> #{isth} ,</if>
<if test="sortid != null"> #{sortid} ,</if>
<if test="isjxkh != null and isjxkh != ''"> #{isjxkh} ,</if>
<if test="xmkzje != null"> #{xmkzje} ,</if>
<if test="pof_id != null and pof_id != ''"> #{pof_id} ,</if>
<if test="zt != null"> #{zt} ,</if>
<if test="srysje != null"> #{srysje} ,</if>
<if test="xmfldm != null and xmfldm != ''"> #{xmfldm} ,</if>
<if test="grdm != null and grdm != ''"> #{grdm} ,</if>
<if test="tblx != null"> #{tblx} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from hbg_xmml a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="" useGeneratedKeys="true">
insert into hbg_xmml(tbrid, tbrxm, tbrtel, tbrq, id, xmdm, xmmc, gsdm, kjnd, bmdm, xmfzr, xmfzrtel, xmnd, xmlb, xmsbje, xmpfje, xmsbsm, bz, isth, sortid, isjxkh, xmkzje, pof_id, zt, srysje, xmfldm, grdm, tblx, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.tbrid},#{entity.tbrxm},#{entity.tbrtel},#{entity.tbrq},#{entity.id},#{entity.xmdm},#{entity.xmmc},#{entity.gsdm},#{entity.kjnd},#{entity.bmdm},#{entity.xmfzr},#{entity.xmfzrtel},#{entity.xmnd},#{entity.xmlb},#{entity.xmsbje},#{entity.xmpfje},#{entity.xmsbsm},#{entity.bz},#{entity.isth},#{entity.sortid},#{entity.isjxkh},#{entity.xmkzje},#{entity.pof_id},#{entity.zt},#{entity.srysje},#{entity.xmfldm},#{entity.grdm},#{entity.tblx}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="" useGeneratedKeys="true">
insert into hbg_xmml(tbrid, tbrxm, tbrtel, tbrq, id, xmdm, xmmc, gsdm, kjnd, bmdm, xmfzr, xmfzrtel, xmnd, xmlb, xmsbje, xmpfje, xmsbsm, bz, isth, sortid, isjxkh, xmkzje, pof_id, zt, srysje, xmfldm, grdm, tblx)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.tbrid},#{entity.tbrxm},#{entity.tbrtel},#{entity.tbrq},#{entity.id},#{entity.xmdm},#{entity.xmmc},#{entity.gsdm},#{entity.kjnd},#{entity.bmdm},#{entity.xmfzr},#{entity.xmfzrtel},#{entity.xmnd},#{entity.xmlb},#{entity.xmsbje},#{entity.xmpfje},#{entity.xmsbsm},#{entity.bz},#{entity.isth},#{entity.sortid},#{entity.isjxkh},#{entity.xmkzje},#{entity.pof_id},#{entity.zt},#{entity.srysje},#{entity.xmfldm},#{entity.grdm},#{entity.tblx})
</foreach>
on duplicate key update
tbrid = values(tbrid),
tbrxm = values(tbrxm),
tbrtel = values(tbrtel),
tbrq = values(tbrq),
id = values(id),
xmdm = values(xmdm),
xmmc = values(xmmc),
gsdm = values(gsdm),
kjnd = values(kjnd),
bmdm = values(bmdm),
xmfzr = values(xmfzr),
xmfzrtel = values(xmfzrtel),
xmnd = values(xmnd),
xmlb = values(xmlb),
xmsbje = values(xmsbje),
xmpfje = values(xmpfje),
xmsbsm = values(xmsbsm),
bz = values(bz),
isth = values(isth),
sortid = values(sortid),
isjxkh = values(isjxkh),
xmkzje = values(xmkzje),
pof_id = values(pof_id),
zt = values(zt),
srysje = values(srysje),
xmfldm = values(xmfldm),
grdm = values(grdm),
tblx = values(tblx)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity" >
update hbg_xmml set
<trim suffix="" suffixOverrides=",">
<if test="tbrid != null and tbrid != ''"> tbrid = #{tbrid},</if>
<if test="tbrxm != null and tbrxm != ''"> tbrxm = #{tbrxm},</if>
<if test="tbrtel != null and tbrtel != ''"> tbrtel = #{tbrtel},</if>
<if test="tbrq != null and tbrq != ''"> tbrq = #{tbrq},</if>
<if test="id != null and id != ''"> id = #{id},</if>
<if test="xmdm != null and xmdm != ''"> xmdm = #{xmdm},</if>
<if test="xmmc != null and xmmc != ''"> xmmc = #{xmmc},</if>
<if test="gsdm != null and gsdm != ''"> gsdm = #{gsdm},</if>
<if test="kjnd != null and kjnd != ''"> kjnd = #{kjnd},</if>
<if test="bmdm != null and bmdm != ''"> bmdm = #{bmdm},</if>
<if test="xmfzr != null and xmfzr != ''"> xmfzr = #{xmfzr},</if>
<if test="xmfzrtel != null and xmfzrtel != ''"> xmfzrtel = #{xmfzrtel},</if>
<if test="xmnd != null and xmnd != ''"> xmnd = #{xmnd},</if>
<if test="xmlb != null and xmlb != ''"> xmlb = #{xmlb},</if>
<if test="xmsbje != null"> xmsbje = #{xmsbje},</if>
<if test="xmpfje != null"> xmpfje = #{xmpfje},</if>
<if test="xmsbsm != null and xmsbsm != ''"> xmsbsm = #{xmsbsm},</if>
<if test="bz != null and bz != ''"> bz = #{bz},</if>
<if test="isth != null and isth != ''"> isth = #{isth},</if>
<if test="sortid != null"> sortid = #{sortid},</if>
<if test="isjxkh != null and isjxkh != ''"> isjxkh = #{isjxkh},</if>
<if test="xmkzje != null"> xmkzje = #{xmkzje},</if>
<if test="pof_id != null and pof_id != ''"> pof_id = #{pof_id},</if>
<if test="zt != null"> zt = #{zt},</if>
<if test="srysje != null"> srysje = #{srysje},</if>
<if test="xmfldm != null and xmfldm != ''"> xmfldm = #{xmfldm},</if>
<if test="grdm != null and grdm != ''"> grdm = #{grdm},</if>
<if test="tblx != null"> tblx = #{tblx},</if>
</trim>
where = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity" >
update hbg_xmml set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity" >
update hbg_xmml set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="tbrid != null and tbrid != ''"> and tbrid = #{tbrid} </if>
<if test="tbrxm != null and tbrxm != ''"> and tbrxm = #{tbrxm} </if>
<if test="tbrtel != null and tbrtel != ''"> and tbrtel = #{tbrtel} </if>
<if test="tbrq != null and tbrq != ''"> and tbrq = #{tbrq} </if>
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="xmdm != null and xmdm != ''"> and xmdm = #{xmdm} </if>
<if test="xmmc != null and xmmc != ''"> and xmmc = #{xmmc} </if>
<if test="gsdm != null and gsdm != ''"> and gsdm = #{gsdm} </if>
<if test="kjnd != null and kjnd != ''"> and kjnd = #{kjnd} </if>
<if test="bmdm != null and bmdm != ''"> and bmdm = #{bmdm} </if>
<if test="xmfzr != null and xmfzr != ''"> and xmfzr = #{xmfzr} </if>
<if test="xmfzrtel != null and xmfzrtel != ''"> and xmfzrtel = #{xmfzrtel} </if>
<if test="xmnd != null and xmnd != ''"> and xmnd = #{xmnd} </if>
<if test="xmlb != null and xmlb != ''"> and xmlb = #{xmlb} </if>
<if test="xmsbje != null"> and xmsbje = #{xmsbje} </if>
<if test="xmpfje != null"> and xmpfje = #{xmpfje} </if>
<if test="xmsbsm != null and xmsbsm != ''"> and xmsbsm = #{xmsbsm} </if>
<if test="bz != null and bz != ''"> and bz = #{bz} </if>
<if test="isth != null and isth != ''"> and isth = #{isth} </if>
<if test="sortid != null"> and sortid = #{sortid} </if>
<if test="isjxkh != null and isjxkh != ''"> and isjxkh = #{isjxkh} </if>
<if test="xmkzje != null"> and xmkzje = #{xmkzje} </if>
<if test="pof_id != null and pof_id != ''"> and pof_id = #{pof_id} </if>
<if test="zt != null"> and zt = #{zt} </if>
<if test="srysje != null"> and srysje = #{srysje} </if>
<if test="xmfldm != null and xmfldm != ''"> and xmfldm = #{xmfldm} </if>
<if test="grdm != null and grdm != ''"> and grdm = #{grdm} </if>
<if test="tblx != null"> and tblx = #{tblx} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from hbg_xmml where = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,13 @@
package com.hzya.frame.grpU8.hbg.service;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity;
/**
* 经费表(HbgJfb)表服务接口
*
* @author xiaoguo
* @since 2025-08-13 17:06:09
*/
public interface IHbgJfbService extends IBaseService<HbgJfbEntity, String> {
}

View File

@ -0,0 +1,28 @@
package com.hzya.frame.grpU8.hbg.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity;
import com.hzya.frame.web.entity.JsonResultEntity;
/**
* 项目目录表(HbgXmml)表服务接口
*
* @author xiaoguo
* @since 2025-08-13 17:09:11
*/
public interface IHbgXmmlService extends IBaseService<HbgXmmlEntity, String>{
/**
* 部门预算经费保存并提交
* @param entity
* @return
*/
public JsonResultEntity saveXmmlAndSubmit(HbgXmmlEntity entity);
/**
* 部门预算经费保存并提交
* @param entity
* @return
*/
public JsonResultEntity saveXmmlAndSubmitByJson(JSONObject entity);
}

View File

@ -0,0 +1,25 @@
package com.hzya.frame.grpU8.hbg.service.impl;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.grpU8.hbg.dao.IHbgJfbDao;
import com.hzya.frame.grpU8.hbg.entity.HbgJfbEntity;
import com.hzya.frame.grpU8.hbg.service.IHbgJfbService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
/**
* 经费表(HbgJfb)表服务实现类
*
* @author xiaoguo
* @since 2025-08-13 17:06:10
*/
@Service(value = "hbgJfbService")
public class HbgJfbServiceImpl extends BaseService<HbgJfbEntity, String> implements IHbgJfbService {
private IHbgJfbDao hbgJfbDao;
@Autowired
public void setHbgJfbDao(IHbgJfbDao dao) {
this.hbgJfbDao = dao;
this.dao = dao;
}
}

View File

@ -0,0 +1,43 @@
package com.hzya.frame.grpU8.hbg.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSON;
import com.hzya.frame.grpU8.hbg.dao.IHbgXmmlDao;
import com.hzya.frame.grpU8.hbg.entity.HbgXmmlEntity;
import com.hzya.frame.grpU8.hbg.service.IHbgXmmlService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* 项目目录表(HbgXmml)表服务实现类
*
* @author xiaoguo
* @since 2025-08-13 17:09:12
*/
@Service(value = "hbgXmmlService")
public class HbgXmmlServiceImpl extends BaseService<HbgXmmlEntity, String> implements IHbgXmmlService {
private IHbgXmmlDao hbgXmmlDao;
@Autowired
public void setHbgXmmlDao(IHbgXmmlDao dao) {
this.hbgXmmlDao = dao;
this.dao = dao;
}
@Override
public JsonResultEntity saveXmmlAndSubmit(HbgXmmlEntity entity) {
return BaseResult.getFailureMessageEntity("保存成功",hbgXmmlDao.saveXmmlAndSubmit(entity) ) ;
}
@Override
public JsonResultEntity saveXmmlAndSubmitByJson(JSONObject entity) {
String data = entity.getString("jsonStr");
HbgXmmlEntity hbgXmmlEntity = JSON.parseObject(data,HbgXmmlEntity.class);
return BaseResult.getFailureMessageEntity("保存成功",hbgXmmlDao.saveXmmlAndSubmit(hbgXmmlEntity) ) ;
}
}