1、新增:合同收款单同步插件。
This commit is contained in:
parent
560ff867e7
commit
d6cd41d3a4
|
@ -0,0 +1,230 @@
|
|||
package com.hzya.frame.plugin.gm;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.gm.constant.ProfilesActiveConstant;
|
||||
import com.hzya.frame.plugin.gm.dao.IGmoaContractPaymentReceiptDao;
|
||||
import com.hzya.frame.plugin.gm.dao.IGmoaCostAdjustmentAuditDao;
|
||||
import com.hzya.frame.plugin.gm.entity.GmoaContractPaymentReceiptEntity;
|
||||
import com.hzya.frame.plugin.gm.utils.SaveOrUpdateBusinessLogUtil;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||
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 java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
/**
|
||||
* Created by zydd on 2025-08-23 13:53
|
||||
*/
|
||||
public class OA_plugin_contract_payment_receipt extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(OA_plugin_contract_payment_receipt.class);
|
||||
private static final ReentrantLock LOCK = new ReentrantLock(true);
|
||||
// 创建格式化器
|
||||
public static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
List<GmoaContractPaymentReceiptEntity> OA_LIST_SAVE = new ArrayList<>();
|
||||
List<GmoaContractPaymentReceiptEntity> OA_LIST_UPDATE = new ArrayList<>();
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "执行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "执行销毁方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "gm.OA_plugin_contract_payment_receipt";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "广脉:合同收款单同步";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "广脉:合同收款单同步";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
try {
|
||||
logger.info("调用:" + getPluginName() + "-插件");
|
||||
String prod = "prod";
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
if (requestJson != null && ProfilesActiveConstant.TYPE_DATE.equals(requestJson.get("type"))) {
|
||||
//按日期
|
||||
if (param != null && !"".equals(param)) {
|
||||
String[] split = param.split("/");
|
||||
if (!(split.length == 2)) {
|
||||
Assert.state(false, "时间格式传递不正确");
|
||||
}
|
||||
Assert.notNull(split[0], "开始时间不能为空");
|
||||
Assert.notNull(split[1], "结束时间不能为空");
|
||||
start(split[0], split[1]);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(prod)) {
|
||||
//默认
|
||||
start();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("executeBusiness方法抛出异常", e);
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("插件执行成功");
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao;
|
||||
@Autowired
|
||||
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
|
||||
@Autowired
|
||||
private IGmoaContractPaymentReceiptDao contractPaymentReceiptDao;
|
||||
|
||||
|
||||
public void start() {
|
||||
try {
|
||||
|
||||
// 获取当前日期和时间,时间偏移10分钟
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
String end = now.format(formatter);
|
||||
String start = now.minusMinutes(10L).format(formatter);
|
||||
logger.info("自动同步==> 合同收款单同步 时间区间:[{}]-[{}]", start, end);
|
||||
|
||||
//查询数据
|
||||
List<GmoaContractPaymentReceiptEntity> allOAList = queryData(start, end);
|
||||
|
||||
//过滤,生成凭证的报错
|
||||
filterData(allOAList);
|
||||
//保存
|
||||
saveData(OA_LIST_SAVE);
|
||||
//更新
|
||||
updateData(OA_LIST_UPDATE);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void start(String startTime, String endTime) {
|
||||
OA_LIST_SAVE.clear();
|
||||
OA_LIST_UPDATE.clear();
|
||||
startTime += " 00:00:00";
|
||||
endTime += " 23:59:59";
|
||||
try {
|
||||
//查询数据
|
||||
List<GmoaContractPaymentReceiptEntity> allOAList = queryData(startTime, endTime);
|
||||
|
||||
//过滤,生成凭证的报错
|
||||
filterData(allOAList);
|
||||
|
||||
//保存
|
||||
saveData(OA_LIST_SAVE);
|
||||
//更新
|
||||
updateData(OA_LIST_UPDATE);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void filterData(List<GmoaContractPaymentReceiptEntity> allOAList) {
|
||||
|
||||
for (GmoaContractPaymentReceiptEntity gmoaContractPaymentReceiptEntity : allOAList) {
|
||||
String billCode = gmoaContractPaymentReceiptEntity.getBillCode();
|
||||
GmoaContractPaymentReceiptEntity contractPaymentReceiptEntity = new GmoaContractPaymentReceiptEntity();
|
||||
contractPaymentReceiptEntity.setBillCode(billCode);
|
||||
List<GmoaContractPaymentReceiptEntity> query = contractPaymentReceiptDao.query(contractPaymentReceiptEntity);
|
||||
if (query.size() == 0) {
|
||||
OA_LIST_SAVE.add(gmoaContractPaymentReceiptEntity);
|
||||
continue;
|
||||
}
|
||||
GmoaContractPaymentReceiptEntity gmoaContractPaymentReceiptEntity1 = query.get(0);
|
||||
String billstatus = gmoaContractPaymentReceiptEntity1.getBillstatus();
|
||||
if ("Y".equals(billstatus)) {
|
||||
//已经推送了凭证,又修改了单据。,报错
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||
integrationTaskLivingDetailsEntity.setId(UUID.randomUUID().toString());
|
||||
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N);
|
||||
integrationTaskLivingDetailsEntity.setRootAppNewData(billCode);
|
||||
integrationTaskLivingDetailsEntity.setNewTransmitInfo("已推送凭证");
|
||||
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
|
||||
integrationTaskLivingDetailsEntity.setBusinessDate(gmoaContractPaymentReceiptEntity.getTs());
|
||||
integrationTaskLivingDetailsEntity.setRootAppPk(billCode);
|
||||
integrationTaskLivingDetailsEntity.setRootAppBill(billCode);
|
||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||
iIntegrationTaskLivingDetailsDao.save(integrationTaskLivingDetailsEntity);
|
||||
continue;
|
||||
}
|
||||
OA_LIST_UPDATE.add(gmoaContractPaymentReceiptEntity);
|
||||
}
|
||||
}
|
||||
|
||||
//批量更新 billStatus=N,sts=Y,dataStatus=Y,id=UUID()
|
||||
private void saveData(List<GmoaContractPaymentReceiptEntity> oaListSave) {
|
||||
oaListSave.forEach(entity -> {
|
||||
entity.setBillstatus("N");
|
||||
entity.setSts("Y");
|
||||
entity.setDataStatus("Y");
|
||||
entity.setId(UUID.randomUUID().toString()); // 生成 UUID 并转为字符串
|
||||
});
|
||||
|
||||
List<List<GmoaContractPaymentReceiptEntity>> partition = Lists.partition(oaListSave, 500);
|
||||
for (List<GmoaContractPaymentReceiptEntity> gmoaContractPaymentReceiptEntities : partition) {
|
||||
contractPaymentReceiptDao.saveList(gmoaContractPaymentReceiptEntities);
|
||||
}
|
||||
// for (GmoaContractPaymentReceiptEntity gmoaContractPaymentReceiptEntity : oaListSave) {
|
||||
// adjustmentAuditDao.save(gmoaContractPaymentReceiptEntity);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void updateData(List<GmoaContractPaymentReceiptEntity> oaListUpdate) {
|
||||
|
||||
List<GmoaContractPaymentReceiptEntity> list = new ArrayList<>();
|
||||
|
||||
for (GmoaContractPaymentReceiptEntity gmoaContractPaymentReceiptEntity : oaListUpdate) {
|
||||
String billCode = gmoaContractPaymentReceiptEntity.getBillCode();
|
||||
|
||||
GmoaContractPaymentReceiptEntity deleteEntity = new GmoaContractPaymentReceiptEntity();
|
||||
deleteEntity.setBillCode(billCode);
|
||||
contractPaymentReceiptDao.delete("com.hzya.frame.plugin.gm.dao.impl.GmoaContractPaymentReceiptDaoImpl.entity_delete", deleteEntity);
|
||||
list.add(gmoaContractPaymentReceiptEntity);
|
||||
}
|
||||
saveData(list);
|
||||
}
|
||||
|
||||
|
||||
private List<GmoaContractPaymentReceiptEntity> queryData(String start, String end) {
|
||||
GmoaContractPaymentReceiptEntity entity = new GmoaContractPaymentReceiptEntity();
|
||||
entity.setStartTime(start);
|
||||
entity.setEndTime(end);
|
||||
List<GmoaContractPaymentReceiptEntity> all = contractPaymentReceiptDao.queryOAAll(entity);
|
||||
return all;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.hzya.frame.plugin.gm.dao;
|
||||
|
||||
import com.hzya.frame.plugin.gm.entity.GmoaContractPaymentReceiptEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.plugin.gm.entity.GmoaCostAdjustmentAuditEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 广脉OA:合同收款单(gmoa_contract_payment_receipt: table)表数据库访问层
|
||||
*
|
||||
* @author zydd
|
||||
* @since 2025-08-27 09:36:34
|
||||
*/
|
||||
public interface IGmoaContractPaymentReceiptDao extends IBaseDao<GmoaContractPaymentReceiptEntity, String> {
|
||||
|
||||
List<GmoaContractPaymentReceiptEntity> queryOAAll(GmoaContractPaymentReceiptEntity entity);
|
||||
|
||||
void saveList(List<GmoaContractPaymentReceiptEntity> list);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.hzya.frame.plugin.gm.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.plugin.gm.constant.ProfilesActiveConstant;
|
||||
import com.hzya.frame.plugin.gm.entity.GmoaContractPaymentReceiptEntity;
|
||||
import com.hzya.frame.plugin.gm.dao.IGmoaContractPaymentReceiptDao;
|
||||
import com.hzya.frame.plugin.gm.entity.GmoaCostAdjustmentAuditEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 广脉OA:合同收款单(GmoaContractPaymentReceipt)表数据库访问层
|
||||
*
|
||||
* @author zydd
|
||||
* @since 2025-08-27 09:36:34
|
||||
*/
|
||||
public class GmoaContractPaymentReceiptDaoImpl extends MybatisGenericDao<GmoaContractPaymentReceiptEntity, String> implements IGmoaContractPaymentReceiptDao {
|
||||
@DS(ProfilesActiveConstant.GM_OA_DATE_SOURCE)
|
||||
@Override
|
||||
public List<GmoaContractPaymentReceiptEntity> queryOAAll(GmoaContractPaymentReceiptEntity entity) {
|
||||
List<GmoaContractPaymentReceiptEntity> all =
|
||||
(List<GmoaContractPaymentReceiptEntity>) selectList("com.hzya.frame.plugin.gm.dao.impl.GmoaContractPaymentReceiptDaoImpl.queryOAAll", entity);
|
||||
return all;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveList(List<GmoaContractPaymentReceiptEntity> list) {
|
||||
insert("com.hzya.frame.plugin.gm.dao.impl.GmoaContractPaymentReceiptDaoImpl.saveList", list);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,285 @@
|
|||
package com.hzya.frame.plugin.gm.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 广脉OA:合同收款单(GmoaContractPaymentReceipt)实体类
|
||||
*
|
||||
* @author zydd
|
||||
* @since 2025-08-27 09:36:34
|
||||
*/
|
||||
public class GmoaContractPaymentReceiptEntity extends BaseEntity {
|
||||
|
||||
/** 单据规则 */
|
||||
private String documentRule;
|
||||
/** 单据规则流水号 */
|
||||
private Long documentRuleNum;
|
||||
/** 数据状态 Y正常 N删除 F修改 */
|
||||
private String dataStatus;
|
||||
/** 新增数据状态 0待下发 1已下发 */
|
||||
private String addStatus;
|
||||
/** 修改数据状态 0待下发 1已下发 */
|
||||
private String updateStatus;
|
||||
/** 删除数据状态 0待下发 1已下发 */
|
||||
private String deleteStatus;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
/** data_id */
|
||||
private String dataId;
|
||||
/** mdm_up_id */
|
||||
private String mdmUpId;
|
||||
/** 单据编号 */
|
||||
private String billCode;
|
||||
/** 项目ID */
|
||||
private String projectId;
|
||||
/** 项目编码 */
|
||||
private String projectCode;
|
||||
/** 项目名称 */
|
||||
private String projectName;
|
||||
/** 一级项目类型 */
|
||||
private String oneProjectType;
|
||||
/** 收款日期 */
|
||||
private String receiveDate;
|
||||
/** 审核日期 */
|
||||
private String examineDate;
|
||||
/** 付款单位ID */
|
||||
private String paymentUnitId;
|
||||
/** 付款单位 */
|
||||
private String paymentUnitName;
|
||||
/** 制单人 */
|
||||
private String maker;
|
||||
/** 收款金额 */
|
||||
private String receiveMoney;
|
||||
/** 最后更新时间 */
|
||||
private String ts;
|
||||
/** 生成状态 */
|
||||
private String billstatus;
|
||||
/** 收款银行 */
|
||||
private String khyh;
|
||||
/** 银行号 */
|
||||
private String yhzh;
|
||||
/** 户名 */
|
||||
private String skrhm;
|
||||
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
|
||||
public String getDocumentRule() {
|
||||
return documentRule;
|
||||
}
|
||||
|
||||
public void setDocumentRule(String documentRule) {
|
||||
this.documentRule = documentRule;
|
||||
}
|
||||
|
||||
public Long getDocumentRuleNum() {
|
||||
return documentRuleNum;
|
||||
}
|
||||
|
||||
public void setDocumentRuleNum(Long documentRuleNum) {
|
||||
this.documentRuleNum = documentRuleNum;
|
||||
}
|
||||
|
||||
public String getDataStatus() {
|
||||
return dataStatus;
|
||||
}
|
||||
|
||||
public void setDataStatus(String dataStatus) {
|
||||
this.dataStatus = dataStatus;
|
||||
}
|
||||
|
||||
public String getAddStatus() {
|
||||
return addStatus;
|
||||
}
|
||||
|
||||
public void setAddStatus(String addStatus) {
|
||||
this.addStatus = addStatus;
|
||||
}
|
||||
|
||||
public String getUpdateStatus() {
|
||||
return updateStatus;
|
||||
}
|
||||
|
||||
public void setUpdateStatus(String updateStatus) {
|
||||
this.updateStatus = updateStatus;
|
||||
}
|
||||
|
||||
public String getDeleteStatus() {
|
||||
return deleteStatus;
|
||||
}
|
||||
|
||||
public void setDeleteStatus(String deleteStatus) {
|
||||
this.deleteStatus = deleteStatus;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getDataId() {
|
||||
return dataId;
|
||||
}
|
||||
|
||||
public void setDataId(String dataId) {
|
||||
this.dataId = dataId;
|
||||
}
|
||||
|
||||
public String getMdmUpId() {
|
||||
return mdmUpId;
|
||||
}
|
||||
|
||||
public void setMdmUpId(String mdmUpId) {
|
||||
this.mdmUpId = mdmUpId;
|
||||
}
|
||||
|
||||
public String getBillCode() {
|
||||
return billCode;
|
||||
}
|
||||
|
||||
public void setBillCode(String billCode) {
|
||||
this.billCode = billCode;
|
||||
}
|
||||
|
||||
public String getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(String projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getProjectCode() {
|
||||
return projectCode;
|
||||
}
|
||||
|
||||
public void setProjectCode(String projectCode) {
|
||||
this.projectCode = projectCode;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getOneProjectType() {
|
||||
return oneProjectType;
|
||||
}
|
||||
|
||||
public void setOneProjectType(String oneProjectType) {
|
||||
this.oneProjectType = oneProjectType;
|
||||
}
|
||||
|
||||
public String getReceiveDate() {
|
||||
return receiveDate;
|
||||
}
|
||||
|
||||
public void setReceiveDate(String receiveDate) {
|
||||
this.receiveDate = receiveDate;
|
||||
}
|
||||
|
||||
public String getExamineDate() {
|
||||
return examineDate;
|
||||
}
|
||||
|
||||
public void setExamineDate(String examineDate) {
|
||||
this.examineDate = examineDate;
|
||||
}
|
||||
|
||||
public String getPaymentUnitId() {
|
||||
return paymentUnitId;
|
||||
}
|
||||
|
||||
public void setPaymentUnitId(String paymentUnitId) {
|
||||
this.paymentUnitId = paymentUnitId;
|
||||
}
|
||||
|
||||
public String getPaymentUnitName() {
|
||||
return paymentUnitName;
|
||||
}
|
||||
|
||||
public void setPaymentUnitName(String paymentUnitName) {
|
||||
this.paymentUnitName = paymentUnitName;
|
||||
}
|
||||
|
||||
public String getMaker() {
|
||||
return maker;
|
||||
}
|
||||
|
||||
public void setMaker(String maker) {
|
||||
this.maker = maker;
|
||||
}
|
||||
|
||||
public String getReceiveMoney() {
|
||||
return receiveMoney;
|
||||
}
|
||||
|
||||
public void setReceiveMoney(String receiveMoney) {
|
||||
this.receiveMoney = receiveMoney;
|
||||
}
|
||||
|
||||
public String getTs() {
|
||||
return ts;
|
||||
}
|
||||
|
||||
public void setTs(String ts) {
|
||||
this.ts = ts;
|
||||
}
|
||||
|
||||
public String getBillstatus() {
|
||||
return billstatus;
|
||||
}
|
||||
|
||||
public void setBillstatus(String billstatus) {
|
||||
this.billstatus = billstatus;
|
||||
}
|
||||
|
||||
public String getKhyh() {
|
||||
return khyh;
|
||||
}
|
||||
|
||||
public void setKhyh(String khyh) {
|
||||
this.khyh = khyh;
|
||||
}
|
||||
|
||||
public String getYhzh() {
|
||||
return yhzh;
|
||||
}
|
||||
|
||||
public void setYhzh(String yhzh) {
|
||||
this.yhzh = yhzh;
|
||||
}
|
||||
|
||||
public String getSkrhm() {
|
||||
return skrhm;
|
||||
}
|
||||
|
||||
public void setSkrhm(String skrhm) {
|
||||
this.skrhm = skrhm;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,610 @@
|
|||
<?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.plugin.gm.dao.impl.GmoaContractPaymentReceiptDaoImpl">
|
||||
|
||||
<resultMap id="get-GmoaContractPaymentReceiptEntity-result"
|
||||
type="com.hzya.frame.plugin.gm.entity.GmoaContractPaymentReceiptEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="documentRule" column="document_rule" jdbcType="VARCHAR"/>
|
||||
<result property="documentRuleNum" column="document_rule_num" jdbcType="INTEGER"/>
|
||||
<result property="dataStatus" column="data_status" jdbcType="VARCHAR"/>
|
||||
<result property="addStatus" column="add_status" jdbcType="VARCHAR"/>
|
||||
<result property="updateStatus" column="update_status" jdbcType="VARCHAR"/>
|
||||
<result property="deleteStatus" column="delete_status" jdbcType="VARCHAR"/>
|
||||
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
<result property="dataId" column="data_id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmUpId" column="mdm_up_id" jdbcType="VARCHAR"/>
|
||||
<result property="billCode" column="bill_code" jdbcType="VARCHAR"/>
|
||||
<result property="projectId" column="project_id" jdbcType="VARCHAR"/>
|
||||
<result property="projectCode" column="project_code" jdbcType="VARCHAR"/>
|
||||
<result property="projectName" column="project_name" jdbcType="VARCHAR"/>
|
||||
<result property="oneProjectType" column="one_project_type" jdbcType="VARCHAR"/>
|
||||
<result property="receiveDate" column="receive_date" jdbcType="VARCHAR"/>
|
||||
<result property="examineDate" column="examine_date" jdbcType="VARCHAR"/>
|
||||
<result property="paymentUnitId" column="payment_unit_id" jdbcType="VARCHAR"/>
|
||||
<result property="paymentUnitName" column="payment_unit_name" jdbcType="VARCHAR"/>
|
||||
<result property="maker" column="maker" jdbcType="VARCHAR"/>
|
||||
<result property="receiveMoney" column="receive_money" jdbcType="VARCHAR"/>
|
||||
<result property="ts" column="ts" jdbcType="VARCHAR"/>
|
||||
<result property="billstatus" column="billstatus" jdbcType="VARCHAR"/>
|
||||
<result property="khyh" column="khyh" jdbcType="VARCHAR"/>
|
||||
<result property="yhzh" column="yhzh" jdbcType="VARCHAR"/>
|
||||
<result property="skrhm" column="skrhm" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id="GmoaContractPaymentReceiptEntity_Base_Column_List">
|
||||
id
|
||||
,document_rule
|
||||
,document_rule_num
|
||||
,data_status
|
||||
,add_status
|
||||
,update_status
|
||||
,delete_status
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
,data_id
|
||||
,mdm_up_id
|
||||
,bill_code
|
||||
,project_id
|
||||
,project_code
|
||||
,project_name
|
||||
,one_project_type
|
||||
,receive_date
|
||||
,examine_date
|
||||
,payment_unit_id
|
||||
,payment_unit_name
|
||||
,maker
|
||||
,receive_money
|
||||
,ts
|
||||
,billstatus
|
||||
,khyh
|
||||
,yhzh
|
||||
,skrhm
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-GmoaContractPaymentReceiptEntity-result"
|
||||
parameterType="com.hzya.frame.plugin.gm.entity.GmoaContractPaymentReceiptEntity">
|
||||
select
|
||||
<include refid="GmoaContractPaymentReceiptEntity_Base_Column_List"/>
|
||||
from gmoa_contract_payment_receipt
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="documentRule != null and documentRule != ''">and document_rule = #{documentRule}</if>
|
||||
<if test="documentRuleNum != null">and document_rule_num = #{documentRuleNum}</if>
|
||||
<if test="dataStatus != null and dataStatus != ''">and data_status = #{dataStatus}</if>
|
||||
<if test="addStatus != null and addStatus != ''">and add_status = #{addStatus}</if>
|
||||
<if test="updateStatus != null and updateStatus != ''">and update_status = #{updateStatus}</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''">and delete_status = #{deleteStatus}</if>
|
||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
||||
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
|
||||
<if test="create_time != null">and create_time = #{create_time}</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
|
||||
<if test="modify_time != null">and modify_time = #{modify_time}</if>
|
||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
||||
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
|
||||
<if test="companyId != null and companyId != ''">and company_id = #{companyId}</if>
|
||||
<if test="dataId != null and dataId != ''">and data_id = #{dataId}</if>
|
||||
<if test="mdmUpId != null and mdmUpId != ''">and mdm_up_id = #{mdmUpId}</if>
|
||||
<if test="billCode != null and billCode != ''">and bill_code = #{billCode}</if>
|
||||
<if test="projectId != null and projectId != ''">and project_id = #{projectId}</if>
|
||||
<if test="projectCode != null and projectCode != ''">and project_code = #{projectCode}</if>
|
||||
<if test="projectName != null and projectName != ''">and project_name = #{projectName}</if>
|
||||
<if test="oneProjectType != null and oneProjectType != ''">and one_project_type = #{oneProjectType}</if>
|
||||
<if test="receiveDate != null and receiveDate != ''">and receive_date = #{receiveDate}</if>
|
||||
<if test="examineDate != null and examineDate != ''">and examine_date = #{examineDate}</if>
|
||||
<if test="paymentUnitId != null and paymentUnitId != ''">and payment_unit_id = #{paymentUnitId}</if>
|
||||
<if test="paymentUnitName != null and paymentUnitName != ''">and payment_unit_name = #{paymentUnitName}</if>
|
||||
<if test="maker != null and maker != ''">and maker = #{maker}</if>
|
||||
<if test="receiveMoney != null and receiveMoney != ''">and receive_money = #{receiveMoney}</if>
|
||||
<if test="ts != null and ts != ''">and ts = #{ts}</if>
|
||||
<if test="billstatus != null and billstatus != ''">and billstatus = #{billstatus}</if>
|
||||
<if test="khyh != null and khyh != ''">and khyh = #{khyh}</if>
|
||||
<if test="yhzh != null and yhzh != ''">and yhzh = #{yhzh}</if>
|
||||
<if test="skrhm != null and skrhm != ''">and skrhm = #{skrhm}</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.plugin.gm.entity.GmoaContractPaymentReceiptEntity">
|
||||
select count(1) from gmoa_contract_payment_receipt
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="documentRule != null and documentRule != ''">and document_rule = #{documentRule}</if>
|
||||
<if test="documentRuleNum != null">and document_rule_num = #{documentRuleNum}</if>
|
||||
<if test="dataStatus != null and dataStatus != ''">and data_status = #{dataStatus}</if>
|
||||
<if test="addStatus != null and addStatus != ''">and add_status = #{addStatus}</if>
|
||||
<if test="updateStatus != null and updateStatus != ''">and update_status = #{updateStatus}</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''">and delete_status = #{deleteStatus}</if>
|
||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
||||
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
|
||||
<if test="create_time != null">and create_time = #{create_time}</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
|
||||
<if test="modify_time != null">and modify_time = #{modify_time}</if>
|
||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
||||
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
|
||||
<if test="companyId != null and companyId != ''">and company_id = #{companyId}</if>
|
||||
<if test="dataId != null and dataId != ''">and data_id = #{dataId}</if>
|
||||
<if test="mdmUpId != null and mdmUpId != ''">and mdm_up_id = #{mdmUpId}</if>
|
||||
<if test="billCode != null and billCode != ''">and bill_code = #{billCode}</if>
|
||||
<if test="projectId != null and projectId != ''">and project_id = #{projectId}</if>
|
||||
<if test="projectCode != null and projectCode != ''">and project_code = #{projectCode}</if>
|
||||
<if test="projectName != null and projectName != ''">and project_name = #{projectName}</if>
|
||||
<if test="oneProjectType != null and oneProjectType != ''">and one_project_type = #{oneProjectType}</if>
|
||||
<if test="receiveDate != null and receiveDate != ''">and receive_date = #{receiveDate}</if>
|
||||
<if test="examineDate != null and examineDate != ''">and examine_date = #{examineDate}</if>
|
||||
<if test="paymentUnitId != null and paymentUnitId != ''">and payment_unit_id = #{paymentUnitId}</if>
|
||||
<if test="paymentUnitName != null and paymentUnitName != ''">and payment_unit_name = #{paymentUnitName}</if>
|
||||
<if test="maker != null and maker != ''">and maker = #{maker}</if>
|
||||
<if test="receiveMoney != null and receiveMoney != ''">and receive_money = #{receiveMoney}</if>
|
||||
<if test="ts != null and ts != ''">and ts = #{ts}</if>
|
||||
<if test="billstatus != null and billstatus != ''">and billstatus = #{billstatus}</if>
|
||||
<if test="khyh != null and khyh != ''">and khyh = #{khyh}</if>
|
||||
<if test="yhzh != null and yhzh != ''">and yhzh = #{yhzh}</if>
|
||||
<if test="skrhm != null and skrhm != ''">and skrhm = #{skrhm}</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-GmoaContractPaymentReceiptEntity-result"
|
||||
parameterType="com.hzya.frame.plugin.gm.entity.GmoaContractPaymentReceiptEntity">
|
||||
select
|
||||
<include refid="GmoaContractPaymentReceiptEntity_Base_Column_List"/>
|
||||
from gmoa_contract_payment_receipt
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
||||
<if test="documentRule != null and documentRule != ''">and document_rule like
|
||||
concat('%',#{documentRule},'%')
|
||||
</if>
|
||||
<if test="documentRuleNum != null">and document_rule_num like concat('%',#{documentRuleNum},'%')</if>
|
||||
<if test="dataStatus != null and dataStatus != ''">and data_status like concat('%',#{dataStatus},'%')</if>
|
||||
<if test="addStatus != null and addStatus != ''">and add_status like concat('%',#{addStatus},'%')</if>
|
||||
<if test="updateStatus != null and updateStatus != ''">and update_status like
|
||||
concat('%',#{updateStatus},'%')
|
||||
</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''">and delete_status like
|
||||
concat('%',#{deleteStatus},'%')
|
||||
</if>
|
||||
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
|
||||
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
|
||||
concat('%',#{create_user_id},'%')
|
||||
</if>
|
||||
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
|
||||
concat('%',#{modify_user_id},'%')
|
||||
</if>
|
||||
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
|
||||
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
|
||||
<if test="org_id != null and org_id != ''">and org_id like concat('%',#{org_id},'%')</if>
|
||||
<if test="companyId != null and companyId != ''">and company_id like concat('%',#{companyId},'%')</if>
|
||||
<if test="dataId != null and dataId != ''">and data_id like concat('%',#{dataId},'%')</if>
|
||||
<if test="mdmUpId != null and mdmUpId != ''">and mdm_up_id like concat('%',#{mdmUpId},'%')</if>
|
||||
<if test="billCode != null and billCode != ''">and bill_code like concat('%',#{billCode},'%')</if>
|
||||
<if test="projectId != null and projectId != ''">and project_id like concat('%',#{projectId},'%')</if>
|
||||
<if test="projectCode != null and projectCode != ''">and project_code like concat('%',#{projectCode},'%')
|
||||
</if>
|
||||
<if test="projectName != null and projectName != ''">and project_name like concat('%',#{projectName},'%')
|
||||
</if>
|
||||
<if test="oneProjectType != null and oneProjectType != ''">and one_project_type like
|
||||
concat('%',#{oneProjectType},'%')
|
||||
</if>
|
||||
<if test="receiveDate != null and receiveDate != ''">and receive_date like concat('%',#{receiveDate},'%')
|
||||
</if>
|
||||
<if test="examineDate != null and examineDate != ''">and examine_date like concat('%',#{examineDate},'%')
|
||||
</if>
|
||||
<if test="paymentUnitId != null and paymentUnitId != ''">and payment_unit_id like
|
||||
concat('%',#{paymentUnitId},'%')
|
||||
</if>
|
||||
<if test="paymentUnitName != null and paymentUnitName != ''">and payment_unit_name like
|
||||
concat('%',#{paymentUnitName},'%')
|
||||
</if>
|
||||
<if test="maker != null and maker != ''">and maker like concat('%',#{maker},'%')</if>
|
||||
<if test="receiveMoney != null and receiveMoney != ''">and receive_money like
|
||||
concat('%',#{receiveMoney},'%')
|
||||
</if>
|
||||
<if test="ts != null and ts != ''">and ts like concat('%',#{ts},'%')</if>
|
||||
<if test="billstatus != null and billstatus != ''">and billstatus like concat('%',#{billstatus},'%')</if>
|
||||
<if test="khyh != null and khyh != ''">and khyh like concat('%',#{khyh},'%')</if>
|
||||
<if test="yhzh != null and yhzh != ''">and yhzh like concat('%',#{yhzh},'%')</if>
|
||||
<if test="skrhm != null and skrhm != ''">and skrhm like concat('%',#{skrhm},'%')</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="GmoaContractPaymentReceiptentity_list_or" resultMap="get-GmoaContractPaymentReceiptEntity-result"
|
||||
parameterType="com.hzya.frame.plugin.gm.entity.GmoaContractPaymentReceiptEntity">
|
||||
select
|
||||
<include refid="GmoaContractPaymentReceiptEntity_Base_Column_List"/>
|
||||
from gmoa_contract_payment_receipt
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">or id = #{id}</if>
|
||||
<if test="documentRule != null and documentRule != ''">or document_rule = #{documentRule}</if>
|
||||
<if test="documentRuleNum != null">or document_rule_num = #{documentRuleNum}</if>
|
||||
<if test="dataStatus != null and dataStatus != ''">or data_status = #{dataStatus}</if>
|
||||
<if test="addStatus != null and addStatus != ''">or add_status = #{addStatus}</if>
|
||||
<if test="updateStatus != null and updateStatus != ''">or update_status = #{updateStatus}</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''">or delete_status = #{deleteStatus}</if>
|
||||
<if test="sorts != null">or sorts = #{sorts}</if>
|
||||
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
|
||||
<if test="create_time != null">or create_time = #{create_time}</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
|
||||
<if test="modify_time != null">or modify_time = #{modify_time}</if>
|
||||
<if test="sts != null and sts != ''">or sts = #{sts}</if>
|
||||
<if test="org_id != null and org_id != ''">or org_id = #{org_id}</if>
|
||||
<if test="companyId != null and companyId != ''">or company_id = #{companyId}</if>
|
||||
<if test="dataId != null and dataId != ''">or data_id = #{dataId}</if>
|
||||
<if test="mdmUpId != null and mdmUpId != ''">or mdm_up_id = #{mdmUpId}</if>
|
||||
<if test="billCode != null and billCode != ''">or bill_code = #{billCode}</if>
|
||||
<if test="projectId != null and projectId != ''">or project_id = #{projectId}</if>
|
||||
<if test="projectCode != null and projectCode != ''">or project_code = #{projectCode}</if>
|
||||
<if test="projectName != null and projectName != ''">or project_name = #{projectName}</if>
|
||||
<if test="oneProjectType != null and oneProjectType != ''">or one_project_type = #{oneProjectType}</if>
|
||||
<if test="receiveDate != null and receiveDate != ''">or receive_date = #{receiveDate}</if>
|
||||
<if test="examineDate != null and examineDate != ''">or examine_date = #{examineDate}</if>
|
||||
<if test="paymentUnitId != null and paymentUnitId != ''">or payment_unit_id = #{paymentUnitId}</if>
|
||||
<if test="paymentUnitName != null and paymentUnitName != ''">or payment_unit_name = #{paymentUnitName}</if>
|
||||
<if test="maker != null and maker != ''">or maker = #{maker}</if>
|
||||
<if test="receiveMoney != null and receiveMoney != ''">or receive_money = #{receiveMoney}</if>
|
||||
<if test="ts != null and ts != ''">or ts = #{ts}</if>
|
||||
<if test="billstatus != null and billstatus != ''">or billstatus = #{billstatus}</if>
|
||||
<if test="khyh != null and khyh != ''">or khyh = #{khyh}</if>
|
||||
<if test="yhzh != null and yhzh != ''">or yhzh = #{yhzh}</if>
|
||||
<if test="skrhm != null and skrhm != ''">or skrhm = #{skrhm}</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.plugin.gm.entity.GmoaContractPaymentReceiptEntity"
|
||||
keyProperty="id" useGeneratedKeys="true">
|
||||
insert into gmoa_contract_payment_receipt(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="documentRule != null and documentRule != ''">document_rule ,</if>
|
||||
<if test="documentRuleNum != null">document_rule_num ,</if>
|
||||
<if test="dataStatus != null and dataStatus != ''">data_status ,</if>
|
||||
<if test="addStatus != null and addStatus != ''">add_status ,</if>
|
||||
<if test="updateStatus != null and updateStatus != ''">update_status ,</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''">delete_status ,</if>
|
||||
<if test="sorts != null">sorts ,</if>
|
||||
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
|
||||
<if test="create_time != null">create_time ,</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
|
||||
<if test="modify_time != null">modify_time ,</if>
|
||||
<if test="sts != null and sts != ''">sts ,</if>
|
||||
<if test="org_id != null and org_id != ''">org_id ,</if>
|
||||
<if test="companyId != null and companyId != ''">company_id ,</if>
|
||||
<if test="dataId != null and dataId != ''">data_id ,</if>
|
||||
<if test="mdmUpId != null and mdmUpId != ''">mdm_up_id ,</if>
|
||||
<if test="billCode != null and billCode != ''">bill_code ,</if>
|
||||
<if test="projectId != null and projectId != ''">project_id ,</if>
|
||||
<if test="projectCode != null and projectCode != ''">project_code ,</if>
|
||||
<if test="projectName != null and projectName != ''">project_name ,</if>
|
||||
<if test="oneProjectType != null and oneProjectType != ''">one_project_type ,</if>
|
||||
<if test="receiveDate != null and receiveDate != ''">receive_date ,</if>
|
||||
<if test="examineDate != null and examineDate != ''">examine_date ,</if>
|
||||
<if test="paymentUnitId != null and paymentUnitId != ''">payment_unit_id ,</if>
|
||||
<if test="paymentUnitName != null and paymentUnitName != ''">payment_unit_name ,</if>
|
||||
<if test="maker != null and maker != ''">maker ,</if>
|
||||
<if test="receiveMoney != null and receiveMoney != ''">receive_money ,</if>
|
||||
<if test="ts != null and ts != ''">ts ,</if>
|
||||
<if test="billstatus != null and billstatus != ''">billstatus ,</if>
|
||||
<if test="khyh != null and khyh != ''">khyh ,</if>
|
||||
<if test="yhzh != null and yhzh != ''">yhzh ,</if>
|
||||
<if test="skrhm != null and skrhm != ''">skrhm ,</if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id} ,</if>
|
||||
<if test="documentRule != null and documentRule != ''">#{documentRule} ,</if>
|
||||
<if test="documentRuleNum != null">#{documentRuleNum} ,</if>
|
||||
<if test="dataStatus != null and dataStatus != ''">#{dataStatus} ,</if>
|
||||
<if test="addStatus != null and addStatus != ''">#{addStatus} ,</if>
|
||||
<if test="updateStatus != null and updateStatus != ''">#{updateStatus} ,</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''">#{deleteStatus} ,</if>
|
||||
<if test="sorts != null">#{sorts} ,</if>
|
||||
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
|
||||
<if test="create_time != null">#{create_time} ,</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
|
||||
<if test="modify_time != null">#{modify_time} ,</if>
|
||||
<if test="sts != null and sts != ''">#{sts} ,</if>
|
||||
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''">#{companyId} ,</if>
|
||||
<if test="dataId != null and dataId != ''">#{dataId} ,</if>
|
||||
<if test="mdmUpId != null and mdmUpId != ''">#{mdmUpId} ,</if>
|
||||
<if test="billCode != null and billCode != ''">#{billCode} ,</if>
|
||||
<if test="projectId != null and projectId != ''">#{projectId} ,</if>
|
||||
<if test="projectCode != null and projectCode != ''">#{projectCode} ,</if>
|
||||
<if test="projectName != null and projectName != ''">#{projectName} ,</if>
|
||||
<if test="oneProjectType != null and oneProjectType != ''">#{oneProjectType} ,</if>
|
||||
<if test="receiveDate != null and receiveDate != ''">#{receiveDate} ,</if>
|
||||
<if test="examineDate != null and examineDate != ''">#{examineDate} ,</if>
|
||||
<if test="paymentUnitId != null and paymentUnitId != ''">#{paymentUnitId} ,</if>
|
||||
<if test="paymentUnitName != null and paymentUnitName != ''">#{paymentUnitName} ,</if>
|
||||
<if test="maker != null and maker != ''">#{maker} ,</if>
|
||||
<if test="receiveMoney != null and receiveMoney != ''">#{receiveMoney} ,</if>
|
||||
<if test="ts != null and ts != ''">#{ts} ,</if>
|
||||
<if test="billstatus != null and billstatus != ''">#{billstatus} ,</if>
|
||||
<if test="khyh != null and khyh != ''">#{khyh} ,</if>
|
||||
<if test="yhzh != null and yhzh != ''">#{yhzh} ,</if>
|
||||
<if test="skrhm != null and skrhm != ''">#{skrhm} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from gmoa_contract_payment_receipt
|
||||
a WHERE a.sts = 'Y' ),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into gmoa_contract_payment_receipt(document_rule, document_rule_num, data_status, add_status,
|
||||
update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id,
|
||||
data_id, mdm_up_id, bill_code, project_id, project_code, project_name, one_project_type, receive_date,
|
||||
examine_date, payment_unit_id, payment_unit_name, maker, receive_money, ts, billstatus, khyh, yhzh, skrhm, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.dataId},#{entity.mdmUpId},#{entity.billCode},#{entity.projectId},#{entity.projectCode},#{entity.projectName},#{entity.oneProjectType},#{entity.receiveDate},#{entity.examineDate},#{entity.paymentUnitId},#{entity.paymentUnitName},#{entity.maker},#{entity.receiveMoney},#{entity.ts},#{entity.billstatus},#{entity.khyh},#{entity.yhzh},#{entity.skrhm},
|
||||
'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into gmoa_contract_payment_receipt(document_rule, document_rule_num, data_status, add_status,
|
||||
update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id,
|
||||
data_id, mdm_up_id, bill_code, project_id, project_code, project_name, one_project_type, receive_date,
|
||||
examine_date, payment_unit_id, payment_unit_name, maker, receive_money, ts, billstatus, khyh, yhzh, skrhm)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.dataId},#{entity.mdmUpId},#{entity.billCode},#{entity.projectId},#{entity.projectCode},#{entity.projectName},#{entity.oneProjectType},#{entity.receiveDate},#{entity.examineDate},#{entity.paymentUnitId},#{entity.paymentUnitName},#{entity.maker},#{entity.receiveMoney},#{entity.ts},#{entity.billstatus},#{entity.khyh},#{entity.yhzh},#{entity.skrhm})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
document_rule = values(document_rule),
|
||||
document_rule_num = values(document_rule_num),
|
||||
data_status = values(data_status),
|
||||
add_status = values(add_status),
|
||||
update_status = values(update_status),
|
||||
delete_status = values(delete_status),
|
||||
create_user_id = values(create_user_id),
|
||||
create_time = values(create_time),
|
||||
modify_user_id = values(modify_user_id),
|
||||
modify_time = values(modify_time),
|
||||
sts = values(sts),
|
||||
org_id = values(org_id),
|
||||
company_id = values(company_id),
|
||||
data_id = values(data_id),
|
||||
mdm_up_id = values(mdm_up_id),
|
||||
bill_code = values(bill_code),
|
||||
project_id = values(project_id),
|
||||
project_code = values(project_code),
|
||||
project_name = values(project_name),
|
||||
one_project_type = values(one_project_type),
|
||||
receive_date = values(receive_date),
|
||||
examine_date = values(examine_date),
|
||||
payment_unit_id = values(payment_unit_id),
|
||||
payment_unit_name = values(payment_unit_name),
|
||||
maker = values(maker),
|
||||
receive_money = values(receive_money),
|
||||
ts = values(ts),
|
||||
billstatus = values(billstatus),
|
||||
khyh = values(khyh),
|
||||
yhzh = values(yhzh),
|
||||
skrhm = values(skrhm)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.plugin.gm.entity.GmoaContractPaymentReceiptEntity">
|
||||
update gmoa_contract_payment_receipt set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="documentRule != null and documentRule != ''">document_rule = #{documentRule},</if>
|
||||
<if test="documentRuleNum != null">document_rule_num = #{documentRuleNum},</if>
|
||||
<if test="dataStatus != null and dataStatus != ''">data_status = #{dataStatus},</if>
|
||||
<if test="addStatus != null and addStatus != ''">add_status = #{addStatus},</if>
|
||||
<if test="updateStatus != null and updateStatus != ''">update_status = #{updateStatus},</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''">delete_status = #{deleteStatus},</if>
|
||||
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
|
||||
<if test="create_time != null">create_time = #{create_time},</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
|
||||
<if test="modify_time != null">modify_time = #{modify_time},</if>
|
||||
<if test="sts != null and sts != ''">sts = #{sts},</if>
|
||||
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
|
||||
<if test="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
||||
<if test="dataId != null and dataId != ''">data_id = #{dataId},</if>
|
||||
<if test="mdmUpId != null and mdmUpId != ''">mdm_up_id = #{mdmUpId},</if>
|
||||
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
|
||||
<if test="projectId != null and projectId != ''">project_id = #{projectId},</if>
|
||||
<if test="projectCode != null and projectCode != ''">project_code = #{projectCode},</if>
|
||||
<if test="projectName != null and projectName != ''">project_name = #{projectName},</if>
|
||||
<if test="oneProjectType != null and oneProjectType != ''">one_project_type = #{oneProjectType},</if>
|
||||
<if test="receiveDate != null and receiveDate != ''">receive_date = #{receiveDate},</if>
|
||||
<if test="examineDate != null and examineDate != ''">examine_date = #{examineDate},</if>
|
||||
<if test="paymentUnitId != null and paymentUnitId != ''">payment_unit_id = #{paymentUnitId},</if>
|
||||
<if test="paymentUnitName != null and paymentUnitName != ''">payment_unit_name = #{paymentUnitName},</if>
|
||||
<if test="maker != null and maker != ''">maker = #{maker},</if>
|
||||
<if test="receiveMoney != null and receiveMoney != ''">receive_money = #{receiveMoney},</if>
|
||||
<if test="ts != null and ts != ''">ts = #{ts},</if>
|
||||
<if test="billstatus != null and billstatus != ''">billstatus = #{billstatus},</if>
|
||||
<if test="khyh != null and khyh != ''">khyh = #{khyh},</if>
|
||||
<if test="yhzh != null and yhzh != ''">yhzh = #{yhzh},</if>
|
||||
<if test="skrhm != null and skrhm != ''">skrhm = #{skrhm},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.plugin.gm.entity.GmoaContractPaymentReceiptEntity">
|
||||
update gmoa_contract_payment_receipt
|
||||
set sts= 'N',
|
||||
modify_time = #{modify_time},
|
||||
modify_user_id = #{modify_user_id}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition"
|
||||
parameterType="com.hzya.frame.plugin.gm.entity.GmoaContractPaymentReceiptEntity">
|
||||
update gmoa_contract_payment_receipt set sts= 'N' ,modify_time = #{modify_time},modify_user_id =
|
||||
#{modify_user_id}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="documentRule != null and documentRule != ''">and document_rule = #{documentRule}</if>
|
||||
<if test="documentRuleNum != null">and document_rule_num = #{documentRuleNum}</if>
|
||||
<if test="dataStatus != null and dataStatus != ''">and data_status = #{dataStatus}</if>
|
||||
<if test="addStatus != null and addStatus != ''">and add_status = #{addStatus}</if>
|
||||
<if test="updateStatus != null and updateStatus != ''">and update_status = #{updateStatus}</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''">and delete_status = #{deleteStatus}</if>
|
||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
||||
<if test="companyId != null and companyId != ''">and company_id = #{companyId}</if>
|
||||
<if test="dataId != null and dataId != ''">and data_id = #{dataId}</if>
|
||||
<if test="mdmUpId != null and mdmUpId != ''">and mdm_up_id = #{mdmUpId}</if>
|
||||
<if test="billCode != null and billCode != ''">and bill_code = #{billCode}</if>
|
||||
<if test="projectId != null and projectId != ''">and project_id = #{projectId}</if>
|
||||
<if test="projectCode != null and projectCode != ''">and project_code = #{projectCode}</if>
|
||||
<if test="projectName != null and projectName != ''">and project_name = #{projectName}</if>
|
||||
<if test="oneProjectType != null and oneProjectType != ''">and one_project_type = #{oneProjectType}</if>
|
||||
<if test="receiveDate != null and receiveDate != ''">and receive_date = #{receiveDate}</if>
|
||||
<if test="examineDate != null and examineDate != ''">and examine_date = #{examineDate}</if>
|
||||
<if test="paymentUnitId != null and paymentUnitId != ''">and payment_unit_id = #{paymentUnitId}</if>
|
||||
<if test="paymentUnitName != null and paymentUnitName != ''">and payment_unit_name = #{paymentUnitName}</if>
|
||||
<if test="maker != null and maker != ''">and maker = #{maker}</if>
|
||||
<if test="receiveMoney != null and receiveMoney != ''">and receive_money = #{receiveMoney}</if>
|
||||
<if test="ts != null and ts != ''">and ts = #{ts}</if>
|
||||
<if test="billstatus != null and billstatus != ''">and billstatus = #{billstatus}</if>
|
||||
<if test="khyh != null and khyh != ''">and khyh = #{khyh}</if>
|
||||
<if test="yhzh != null and yhzh != ''">and yhzh = #{yhzh}</if>
|
||||
<if test="skrhm != null and skrhm != ''">and skrhm = #{skrhm}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete
|
||||
from gmoa_contract_payment_receipt
|
||||
where
|
||||
1=1
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="billCode != null and billCode != ''">and bill_code = #{billCode}</if>
|
||||
</delete>
|
||||
|
||||
<select id="queryOAAll" parameterType="com.hzya.frame.plugin.gm.entity.GmoaContractPaymentReceiptEntity">
|
||||
SELECT
|
||||
bill_code,
|
||||
one_project_type,
|
||||
project_id,
|
||||
project_code,
|
||||
project_name,
|
||||
receive_date,
|
||||
examine_date,
|
||||
payment_unit_id,
|
||||
payment_unit_name,
|
||||
maker,
|
||||
receive_money,
|
||||
khyh,
|
||||
yhzh,
|
||||
skrhm,
|
||||
GREATEST(
|
||||
COALESCE(aCreateTime,'1970-01-01 00:00:00'),
|
||||
COALESCE(aUpdateTime,'1970-01-01 00:00:00'),
|
||||
COALESCE(bUpdateTime,'1970-01-01 00:00:00'),
|
||||
COALESCE(cUpdateTime,'1970-01-01 00:00:00'),
|
||||
COALESCE(dUpdateTime,'1970-01-01 00:00:00')
|
||||
) as ts
|
||||
FROM
|
||||
u8c_contract_payment_receipt
|
||||
where
|
||||
1=1
|
||||
and GREATEST(
|
||||
COALESCE(aCreateTime,'1970-01-01 00:00:00'),
|
||||
COALESCE(aUpdateTime,'1970-01-01 00:00:00'),
|
||||
COALESCE(bUpdateTime,'1970-01-01 00:00:00'),
|
||||
COALESCE(cUpdateTime,'1970-01-01 00:00:00'),
|
||||
COALESCE(dUpdateTime,'1970-01-01 00:00:00')
|
||||
) >= #{startTime}
|
||||
and GREATEST(
|
||||
COALESCE(aCreateTime,'1970-01-01 00:00:00'),
|
||||
COALESCE(aUpdateTime,'1970-01-01 00:00:00'),
|
||||
COALESCE(bUpdateTime,'1970-01-01 00:00:00'),
|
||||
COALESCE(cUpdateTime,'1970-01-01 00:00:00'),
|
||||
COALESCE(dUpdateTime,'1970-01-01 00:00:00')
|
||||
) <= #{endTime}
|
||||
</select>
|
||||
|
||||
<select id="saveList" parameterType="java.util.List">
|
||||
insert into gmoa_contract_payment_receipt(
|
||||
id,
|
||||
data_status,
|
||||
create_time,
|
||||
sts,
|
||||
billstatus,
|
||||
bill_code,
|
||||
one_project_type,
|
||||
project_id,
|
||||
project_code,
|
||||
project_name,
|
||||
receive_date,
|
||||
examine_date,
|
||||
payment_unit_id,
|
||||
payment_unit_name,
|
||||
maker,
|
||||
receive_money,
|
||||
khyh,
|
||||
yhzh,
|
||||
skrhm,
|
||||
ts
|
||||
)values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.dataStatus},
|
||||
now(),
|
||||
#{item.sts},
|
||||
'N',
|
||||
#{item.billCode},
|
||||
#{item.oneProjectType},
|
||||
#{item.projectId},
|
||||
#{item.projectCode},
|
||||
#{item.projectName},
|
||||
#{item.receiveDate},
|
||||
#{item.examineDate},
|
||||
#{item.paymentUnitId},
|
||||
#{item.paymentUnitName},
|
||||
#{item.maker},
|
||||
#{item.receiveMoney},
|
||||
#{item.khyh},
|
||||
#{item.yhzh},
|
||||
#{item.skrhm},
|
||||
#{item.ts}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -474,7 +474,10 @@
|
|||
<delete id="entity_delete">
|
||||
delete
|
||||
from gmoa_cost_adjustment_audit
|
||||
where id = #{id}
|
||||
where
|
||||
1=1
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="billCode != null and billCode != ''">and bill_code = #{billCode}</if>
|
||||
</delete>
|
||||
|
||||
|
||||
|
@ -527,6 +530,7 @@
|
|||
data_status,
|
||||
create_time,
|
||||
sts,
|
||||
billstatus,
|
||||
bill_code,
|
||||
declare_date,
|
||||
examine_date,
|
||||
|
@ -547,6 +551,7 @@
|
|||
#{item.dataStatus},
|
||||
now(),
|
||||
#{item.sts},
|
||||
'N',
|
||||
#{item.billCode},
|
||||
#{item.declareDate},
|
||||
#{item.examineDate},
|
||||
|
|
|
@ -8,10 +8,7 @@ import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
|||
import com.hzya.frame.mdm.mdmModule.service.IMdmModuleService;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.dao.IMdmModuleDbDao;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
import com.hzya.frame.plugin.gm.OA_plugin_acceptance_income_declaration;
|
||||
import com.hzya.frame.plugin.gm.OA_plugin_audit_declaration_form;
|
||||
import com.hzya.frame.plugin.gm.OA_plugin_cost_adjustment_audit;
|
||||
import com.hzya.frame.plugin.gm.SubjectAssBalancePlugin;
|
||||
import com.hzya.frame.plugin.gm.*;
|
||||
import com.hzya.frame.plugin.gm.entity.MdmGmSubjectBalanceEntity;
|
||||
import com.hzya.frame.voucher.ae.comf.bd.dao.*;
|
||||
import com.hzya.frame.voucher.ae.comf.bd.entity.*;
|
||||
|
@ -457,6 +454,19 @@ public class BdController extends DefaultController {
|
|||
}
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private OA_plugin_contract_payment_receipt oaPluginContractPaymentReceipt;
|
||||
@RequestMapping(value = "/oaPluginContractPaymentReceipt", method = RequestMethod.POST)
|
||||
public JsonResultEntity oaPluginContractPaymentReceipt (String start,String end) {
|
||||
try {
|
||||
oaPluginContractPaymentReceipt.start(start,end);
|
||||
return getSuccessMessageEntity("请求成功");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return getFailureMessageEntity(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// *
|
||||
|
|
|
@ -7,4 +7,5 @@
|
|||
<bean name="gmoaAcceptanceIncomeDeclarationDao" class="com.hzya.frame.plugin.gm.dao.impl.GmoaAcceptanceIncomeDeclarationDaoImpl"/>
|
||||
<bean name="gmoaAuditDeclarationFormDao" class="com.hzya.frame.plugin.gm.dao.impl.GmoaAuditDeclarationFormDaoImpl"/>
|
||||
<bean name="gmoaCostAdjustmentAuditDao" class="com.hzya.frame.plugin.gm.dao.impl.GmoaCostAdjustmentAuditDaoImpl"/>
|
||||
<bean name="gmoaContractPaymentReceiptDao" class="com.hzya.frame.plugin.gm.dao.impl.GmoaContractPaymentReceiptDaoImpl"/>
|
||||
</beans>
|
||||
|
|
|
@ -9,4 +9,6 @@
|
|||
<bean name="oa_plugin_audit_declaration_form" class="com.hzya.frame.plugin.gm.OA_plugin_audit_declaration_form"/>
|
||||
<!--成本调整单-->
|
||||
<bean name="oa_plugin_cost_adjustment_audit" class="com.hzya.frame.plugin.gm.OA_plugin_cost_adjustment_audit"/>
|
||||
<!--合同收款单-->
|
||||
<bean name="oa_plugin_contract_payment_receipt" class="com.hzya.frame.plugin.gm.OA_plugin_contract_payment_receipt"/>
|
||||
</beans>
|
||||
|
|
Loading…
Reference in New Issue