diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/OA_plugin_payment_order.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/OA_plugin_payment_order.java new file mode 100644 index 00000000..16f92754 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/OA_plugin_payment_order.java @@ -0,0 +1,211 @@ +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.IGmoaPaymentOrderDao; +import com.hzya.frame.plugin.gm.entity.GmoaPaymentOrderEntity; +import com.hzya.frame.plugin.gm.entity.GmoaTransferDeclarationFormEntity; +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-09-07 15:59 + */ +public class OA_plugin_payment_order extends PluginBaseEntity { + Logger logger = LoggerFactory.getLogger(OA_plugin_transfer_declaration_form.class); + private static final ReentrantLock LOCK = new ReentrantLock(true); + // 创建格式化器 + public static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + + List OA_LIST_SAVE = new ArrayList<>(); + List 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_payment_order"; + } + + @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 IGmoaPaymentOrderDao paymentOrderDao; + + + public void start() { + OA_LIST_SAVE.clear(); + OA_LIST_UPDATE.clear(); + try { + // 获取当前日期和时间,时间偏移10分钟 + LocalDateTime now = LocalDateTime.now(); + String end = now.format(formatter); + String start = now.minusMinutes(30L).format(formatter); + logger.info("自动同步==> 付款单同步 时间区间:[{}]-[{}]", start, end); + } 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 allOAList = queryData(startTime, endTime); + //过滤,生成凭证的报错 + filterData(allOAList); + + //保存 + saveData(OA_LIST_SAVE); + //更新 + updateData(OA_LIST_UPDATE); + + + } catch (Exception e) { + e.printStackTrace(); + } + } + + private void saveData(List oaListSave) { + oaListSave.forEach(entity->{ + entity.setBillstatus("N"); + entity.setSts("Y"); + entity.setDataStatus("Y"); + entity.setId(UUID.randomUUID().toString()); // 生成 UUID 并转为字符串 + }); + List> partition = Lists.partition(oaListSave, 500); + for (List gmoaPaymentOrderEntities : partition) { + paymentOrderDao.saveList(gmoaPaymentOrderEntities); + } + } + + private void updateData(List oaListUpdate) { + List list = new ArrayList<>(); + for (GmoaPaymentOrderEntity gmoaPaymentOrderEntity : oaListUpdate) { + String billCode = gmoaPaymentOrderEntity.getBillCode(); + + GmoaTransferDeclarationFormEntity deleteEntity = new GmoaTransferDeclarationFormEntity(); + deleteEntity.setBillCode(billCode); + paymentOrderDao.delete("com.hzya.frame.plugin.gm.dao.impl.GmoaPaymentOrderDaoImpl.entity_delete",deleteEntity); + list.add(gmoaPaymentOrderEntity); + } + saveData(list); + + } + + private void filterData(List allOAList) { + for (GmoaPaymentOrderEntity gmoaPaymentOrderEntity : allOAList) { + String billCode = gmoaPaymentOrderEntity.getBillCode(); + + GmoaPaymentOrderEntity entity = new GmoaPaymentOrderEntity(); + entity.setBillCode(billCode); + List query = paymentOrderDao.query(entity); + if(query.size() == 0){ + OA_LIST_SAVE.add(gmoaPaymentOrderEntity); + continue; + } + GmoaPaymentOrderEntity gmoaPaymentOrderEntity1 = query.get(0); + String billstatus = gmoaPaymentOrderEntity1.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(gmoaPaymentOrderEntity.getTs()); + integrationTaskLivingDetailsEntity.setRootAppPk(billCode); + integrationTaskLivingDetailsEntity.setRootAppBill(billCode); + integrationTaskLivingDetailsEntity.setPluginId(getPluginId()); + iIntegrationTaskLivingDetailsDao.save(integrationTaskLivingDetailsEntity); + continue; + } + OA_LIST_UPDATE.add(gmoaPaymentOrderEntity); + } + } + + private List queryData(String start, String end) { + GmoaPaymentOrderEntity entity = new GmoaPaymentOrderEntity(); + entity.setStartTime(start); + entity.setEndTime(end); + List all = paymentOrderDao.queryOAAll(entity); + return all; + } + + +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/dao/IGmoaPaymentOrderDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/dao/IGmoaPaymentOrderDao.java new file mode 100644 index 00000000..834c6efb --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/dao/IGmoaPaymentOrderDao.java @@ -0,0 +1,20 @@ +package com.hzya.frame.plugin.gm.dao; + +import com.hzya.frame.plugin.gm.entity.GmoaPaymentOrderEntity; +import com.hzya.frame.basedao.dao.IBaseDao; + +import java.util.List; + +/** + * 广脉OA:付款报单(gmoa_payment_order: table)表数据库访问层 + * + * @author zydd + * @since 2025-09-07 15:51:09 + */ +public interface IGmoaPaymentOrderDao extends IBaseDao { + List queryOAAll(GmoaPaymentOrderEntity entity); + + void saveList(List list); + +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/dao/impl/GmoaPaymentOrderDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/dao/impl/GmoaPaymentOrderDaoImpl.java new file mode 100644 index 00000000..7525302c --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/dao/impl/GmoaPaymentOrderDaoImpl.java @@ -0,0 +1,34 @@ +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.GmoaPaymentOrderEntity; +import com.hzya.frame.plugin.gm.dao.IGmoaPaymentOrderDao; +import com.hzya.frame.plugin.gm.entity.GmoaTransferDeclarationFormEntity; +import org.springframework.stereotype.Repository; +import com.hzya.frame.basedao.dao.MybatisGenericDao; + +import java.util.List; + +/** + * 广脉OA:付款报单(GmoaPaymentOrder)表数据库访问层 + * + * @author zydd + * @since 2025-09-07 15:51:09 + */ +public class GmoaPaymentOrderDaoImpl extends MybatisGenericDao implements IGmoaPaymentOrderDao{ + + @DS(ProfilesActiveConstant.GM_OA_DATE_SOURCE) + @Override + public List queryOAAll(GmoaPaymentOrderEntity entity) { + List all = (List) + selectList("com.hzya.frame.plugin.gm.dao.impl.GmoaPaymentOrderDaoImpl.queryOAAll", entity); + return all; + } + + @Override + public void saveList(List list) { + insert("com.hzya.frame.plugin.gm.dao.impl.GmoaPaymentOrderDaoImpl.saveList",list); + } +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/entity/GmoaPaymentOrderEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/entity/GmoaPaymentOrderEntity.java new file mode 100644 index 00000000..cf6029e6 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/entity/GmoaPaymentOrderEntity.java @@ -0,0 +1,374 @@ +package com.hzya.frame.plugin.gm.entity; + +import java.util.Date; +import com.hzya.frame.web.entity.BaseEntity; +/** + * 广脉OA:付款报单(GmoaPaymentOrder)实体类 + * + * @author zydd + * @since 2025-09-07 15:51:09 + */ +public class GmoaPaymentOrderEntity 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; + /** 制单日期 */ + private String makeDate; + /** 制单人 */ + private String maker; + /** 审核日期 */ + private String examineDate; + /** 项目ID */ + private String projectId; + /** 项目编号 */ + private String projectCode; + /** 项目名称 */ + private String projectName; + /** 一级项目类型 */ + private String oneProjectType; + /** 成本类别 */ + private String costType; + /** 项目性质 */ + private String xmxztzftz; + /** 支出科目 */ + private String expenditureSubject; + /** 供应商ID */ + private String custId; + /** 供应商编码 */ + private String custCode; + /** 供应商名称 */ + private String custName; + /** 项目是否转资 */ + private String isCapitalTransfer; + /** 项目是否确认收入 */ + private String isIncome; + /** 闭口 */ + private String shutUp; + /** 本次付款申请金额 */ + private String payMoney; + /** 除税额 */ + private String deductiontax; + /** 付款单位 */ + private String fkdw; + /** 开户银行 */ + private String khyh; + /** 付款账户 */ + private String fkzh; + /** 实际支付日期 */ + private String sjfksj; + /** 最后更新时间 */ + private String ts; + /** 生成状态 */ + private String billstatus; + 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 getMakeDate() { + return makeDate; + } + + public void setMakeDate(String makeDate) { + this.makeDate = makeDate; + } + + public String getMaker() { + return maker; + } + + public void setMaker(String maker) { + this.maker = maker; + } + + public String getExamineDate() { + return examineDate; + } + + public void setExamineDate(String examineDate) { + this.examineDate = examineDate; + } + + 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 getCostType() { + return costType; + } + + public void setCostType(String costType) { + this.costType = costType; + } + + public String getXmxztzftz() { + return xmxztzftz; + } + + public void setXmxztzftz(String xmxztzftz) { + this.xmxztzftz = xmxztzftz; + } + + public String getExpenditureSubject() { + return expenditureSubject; + } + + public void setExpenditureSubject(String expenditureSubject) { + this.expenditureSubject = expenditureSubject; + } + + public String getCustId() { + return custId; + } + + public void setCustId(String custId) { + this.custId = custId; + } + + public String getCustCode() { + return custCode; + } + + public void setCustCode(String custCode) { + this.custCode = custCode; + } + + public String getCustName() { + return custName; + } + + public void setCustName(String custName) { + this.custName = custName; + } + + public String getIsCapitalTransfer() { + return isCapitalTransfer; + } + + public void setIsCapitalTransfer(String isCapitalTransfer) { + this.isCapitalTransfer = isCapitalTransfer; + } + + public String getIsIncome() { + return isIncome; + } + + public void setIsIncome(String isIncome) { + this.isIncome = isIncome; + } + + public String getShutUp() { + return shutUp; + } + + public void setShutUp(String shutUp) { + this.shutUp = shutUp; + } + + public String getPayMoney() { + return payMoney; + } + + public void setPayMoney(String payMoney) { + this.payMoney = payMoney; + } + + public String getDeductiontax() { + return deductiontax; + } + + public void setDeductiontax(String deductiontax) { + this.deductiontax = deductiontax; + } + + public String getFkdw() { + return fkdw; + } + + public void setFkdw(String fkdw) { + this.fkdw = fkdw; + } + + public String getKhyh() { + return khyh; + } + + public void setKhyh(String khyh) { + this.khyh = khyh; + } + + public String getFkzh() { + return fkzh; + } + + public void setFkzh(String fkzh) { + this.fkzh = fkzh; + } + + public String getSjfksj() { + return sjfksj; + } + + public void setSjfksj(String sjfksj) { + this.sjfksj = sjfksj; + } + + 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; + } + +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/entity/GmoaPaymentOrderEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/entity/GmoaPaymentOrderEntity.xml new file mode 100644 index 00000000..6d8a1b5a --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/gm/entity/GmoaPaymentOrderEntity.xml @@ -0,0 +1,750 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + ,make_date + ,maker + ,examine_date + ,project_id + ,project_code + ,project_name + ,one_project_type + ,cost_type + ,xmxztzftz + ,expenditure_subject + ,cust_id + ,cust_code + ,cust_name + ,is_capital_transfer + ,is_income + ,shut_up + ,pay_money + ,deductiontax + ,fkdw + ,khyh + ,fkzh + ,sjfksj + ,ts + ,billstatus + + + + + + + + + + + + + + + + insert into gmoa_payment_order( + + 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 , + make_date , + maker , + examine_date , + project_id , + project_code , + project_name , + one_project_type , + cost_type , + xmxztzftz , + expenditure_subject , + cust_id , + cust_code , + cust_name , + is_capital_transfer , + is_income , + shut_up , + pay_money , + deductiontax , + fkdw , + khyh , + fkzh , + sjfksj , + ts , + billstatus , + sorts, + sts, + + )values( + + #{id} , + #{documentRule} , + #{documentRuleNum} , + #{dataStatus} , + #{addStatus} , + #{updateStatus} , + #{deleteStatus} , + #{sorts} , + #{create_user_id} , + #{create_time} , + #{modify_user_id} , + #{modify_time} , + #{sts} , + #{org_id} , + #{companyId} , + #{dataId} , + #{mdmUpId} , + #{billCode} , + #{makeDate} , + #{maker} , + #{examineDate} , + #{projectId} , + #{projectCode} , + #{projectName} , + #{oneProjectType} , + #{costType} , + #{xmxztzftz} , + #{expenditureSubject} , + #{custId} , + #{custCode} , + #{custName} , + #{isCapitalTransfer} , + #{isIncome} , + #{shutUp} , + #{payMoney} , + #{deductiontax} , + #{fkdw} , + #{khyh} , + #{fkzh} , + #{sjfksj} , + #{ts} , + #{billstatus} , + (select (max(IFNULL( a.sorts, 0 )) + 1) as sort from gmoa_payment_order a WHERE + a.sts = 'Y' ), + + 'Y', + + ) + + + + insert into gmoa_payment_order(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, make_date, maker, examine_date, project_id, project_code, project_name, one_project_type, + cost_type, xmxztzftz, expenditure_subject, cust_id, cust_code, cust_name, is_capital_transfer, is_income, + shut_up, pay_money, deductiontax, fkdw, khyh, fkzh, sjfksj, ts, billstatus, sts) + values + + (#{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.makeDate},#{entity.maker},#{entity.examineDate},#{entity.projectId},#{entity.projectCode},#{entity.projectName},#{entity.oneProjectType},#{entity.costType},#{entity.xmxztzftz},#{entity.expenditureSubject},#{entity.custId},#{entity.custCode},#{entity.custName},#{entity.isCapitalTransfer},#{entity.isIncome},#{entity.shutUp},#{entity.payMoney},#{entity.deductiontax},#{entity.fkdw},#{entity.khyh},#{entity.fkzh},#{entity.sjfksj},#{entity.ts},#{entity.billstatus}, + 'Y') + + + + + insert into gmoa_payment_order(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, make_date, maker, examine_date, project_id, project_code, project_name, one_project_type, + cost_type, xmxztzftz, expenditure_subject, cust_id, cust_code, cust_name, is_capital_transfer, is_income, + shut_up, pay_money, deductiontax, fkdw, khyh, fkzh, sjfksj, ts, billstatus) + values + + (#{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.makeDate},#{entity.maker},#{entity.examineDate},#{entity.projectId},#{entity.projectCode},#{entity.projectName},#{entity.oneProjectType},#{entity.costType},#{entity.xmxztzftz},#{entity.expenditureSubject},#{entity.custId},#{entity.custCode},#{entity.custName},#{entity.isCapitalTransfer},#{entity.isIncome},#{entity.shutUp},#{entity.payMoney},#{entity.deductiontax},#{entity.fkdw},#{entity.khyh},#{entity.fkzh},#{entity.sjfksj},#{entity.ts},#{entity.billstatus}) + + 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), + make_date = values(make_date), + maker = values(maker), + examine_date = values(examine_date), + project_id = values(project_id), + project_code = values(project_code), + project_name = values(project_name), + one_project_type = values(one_project_type), + cost_type = values(cost_type), + xmxztzftz = values(xmxztzftz), + expenditure_subject = values(expenditure_subject), + cust_id = values(cust_id), + cust_code = values(cust_code), + cust_name = values(cust_name), + is_capital_transfer = values(is_capital_transfer), + is_income = values(is_income), + shut_up = values(shut_up), + pay_money = values(pay_money), + deductiontax = values(deductiontax), + fkdw = values(fkdw), + khyh = values(khyh), + fkzh = values(fkzh), + sjfksj = values(sjfksj), + ts = values(ts), + billstatus = values(billstatus) + + + + update gmoa_payment_order set + + document_rule = #{documentRule}, + document_rule_num = #{documentRuleNum}, + data_status = #{dataStatus}, + add_status = #{addStatus}, + update_status = #{updateStatus}, + delete_status = #{deleteStatus}, + create_user_id = #{create_user_id}, + create_time = #{create_time}, + modify_user_id = #{modify_user_id}, + modify_time = #{modify_time}, + sts = #{sts}, + org_id = #{org_id}, + company_id = #{companyId}, + data_id = #{dataId}, + mdm_up_id = #{mdmUpId}, + bill_code = #{billCode}, + make_date = #{makeDate}, + maker = #{maker}, + examine_date = #{examineDate}, + project_id = #{projectId}, + project_code = #{projectCode}, + project_name = #{projectName}, + one_project_type = #{oneProjectType}, + cost_type = #{costType}, + xmxztzftz = #{xmxztzftz}, + expenditure_subject = + #{expenditureSubject}, + + cust_id = #{custId}, + cust_code = #{custCode}, + cust_name = #{custName}, + is_capital_transfer = + #{isCapitalTransfer}, + + is_income = #{isIncome}, + shut_up = #{shutUp}, + pay_money = #{payMoney}, + deductiontax = #{deductiontax}, + fkdw = #{fkdw}, + khyh = #{khyh}, + fkzh = #{fkzh}, + sjfksj = #{sjfksj}, + ts = #{ts}, + billstatus = #{billstatus}, + + where id = #{id} + + + + update gmoa_payment_order + set sts= 'N', + modify_time = #{modify_time}, + modify_user_id = #{modify_user_id} + where id = #{id} + + + + update gmoa_payment_order set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} + + and id = #{id} + and document_rule = #{documentRule} + and document_rule_num = #{documentRuleNum} + and data_status = #{dataStatus} + and add_status = #{addStatus} + and update_status = #{updateStatus} + and delete_status = #{deleteStatus} + and sorts = #{sorts} + and sts = #{sts} + and company_id = #{companyId} + and data_id = #{dataId} + and mdm_up_id = #{mdmUpId} + and bill_code = #{billCode} + and make_date = #{makeDate} + and maker = #{maker} + and examine_date = #{examineDate} + and project_id = #{projectId} + and project_code = #{projectCode} + and project_name = #{projectName} + and one_project_type = #{oneProjectType} + and cost_type = #{costType} + and xmxztzftz = #{xmxztzftz} + and expenditure_subject = + #{expenditureSubject} + + and cust_id = #{custId} + and cust_code = #{custCode} + and cust_name = #{custName} + and is_capital_transfer = + #{isCapitalTransfer} + + and is_income = #{isIncome} + and shut_up = #{shutUp} + and pay_money = #{payMoney} + and deductiontax = #{deductiontax} + and fkdw = #{fkdw} + and khyh = #{khyh} + and fkzh = #{fkzh} + and sjfksj = #{sjfksj} + and ts = #{ts} + and billstatus = #{billstatus} + and sts='Y' + + + + + delete + from gmoa_payment_order + where id = #{id} + + + + + + + + insert into gmoa_payment_order( + id, + data_status, + create_time, + sts, + billstatus, + + + bill_code, + make_date, + maker, + examine_date, + project_id, + project_code, + project_name, + one_project_type, + cost_type, + xmxztzftz, + expenditure_subject, + cust_id, + cust_code, + cust_name, + is_capital_transfer, + is_income, + shut_up, + pay_money, + deductiontax, + fkdw, + khyh, + fkzh, + sjfksj, + ts + )values + + ( + #{item.id}, + #{item.dataStatus}, + now(), + #{item.sts}, + 'N', + + + #{item.billCode}, + #{item.makeDate}, + #{item.maker}, + #{item.examineDate}, + #{item.projectId}, + #{item.projectCode}, + #{item.projectName}, + #{item.oneProjectType}, + #{item.costType}, + #{item.xmxztzftz}, + #{item.expenditureSubject}, + #{item.custId}, + #{item.custCode}, + #{item.custName}, + #{item.isCapitalTransfer}, + #{item.isIncome}, + #{item.shutUp}, + #{item.payMoney}, + #{item.deductiontax}, + #{item.fkdw}, + #{item.khyh}, + #{item.fkzh}, + #{item.sjfksj}, + #{item.ts} + ) + + + + + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/controller/BdController.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/controller/BdController.java index ed23231d..dc4bf8e9 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/controller/BdController.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/controller/BdController.java @@ -481,6 +481,20 @@ public class BdController extends DefaultController { } + @Autowired + private OA_plugin_payment_order oaPluginPaymentOrder; + @RequestMapping(value = "/oaPluginPaymentOrder", method = RequestMethod.POST) + public JsonResultEntity oaPluginPaymentOrder (String start,String end) { + try { + oaPluginPaymentOrder.start(start,end); + return getSuccessMessageEntity("请求成功"); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity(e.getMessage()); + } + } + + @Autowired private U8C_plugin_bd_jobmngfil u8CPluginBdJobmngfil; diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/gm/spring/spring-buildpackage-dao.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/gm/spring/spring-buildpackage-dao.xml index 2cc65353..87966537 100644 --- a/base-buildpackage/src/main/resources/cfgHome/plugin/gm/spring/spring-buildpackage-dao.xml +++ b/base-buildpackage/src/main/resources/cfgHome/plugin/gm/spring/spring-buildpackage-dao.xml @@ -9,6 +9,7 @@ + diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/gm/spring/spring-buildpackage-plugin.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/gm/spring/spring-buildpackage-plugin.xml index 91db0753..6e5dd57a 100644 --- a/base-buildpackage/src/main/resources/cfgHome/plugin/gm/spring/spring-buildpackage-plugin.xml +++ b/base-buildpackage/src/main/resources/cfgHome/plugin/gm/spring/spring-buildpackage-plugin.xml @@ -13,7 +13,8 @@ - + +