diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/controller/PushLogController.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/controller/PushLogController.java new file mode 100644 index 00000000..c82143be --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/controller/PushLogController.java @@ -0,0 +1,63 @@ +package com.hzya.frame.voucher.ae.push.controller; + +import cn.hutool.core.lang.Assert; +import com.hzya.frame.voucher.ae.generate.core.service.ICoreService; +import com.hzya.frame.voucher.ae.generate.core.vo.CreateVoucherVO; +import com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogDetailsEntity; +import com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogEntity; +import com.hzya.frame.voucher.ae.push.service.IAePushVoucherLogService; +import com.hzya.frame.web.action.DefaultController; +import com.hzya.frame.web.entity.JsonResultEntity; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; +import java.util.Map; + +/** + * Created by zydd on 2025-07-17 16:38 + * 描述:查询受否生成凭证 + */ +@RestController +@RequestMapping("/ae/push/log") +public class PushLogController extends DefaultController { + + + @Autowired + private IAePushVoucherLogService aePushVoucherLogService; + + + + /** + * 查询单据,根据状态 + * 以mdm为准,查询所有单据,过滤日志表 + */ + @RequestMapping(value = "/queryBill", method = RequestMethod.POST) + public JsonResultEntity queryBill(@RequestBody AePushVoucherLogEntity entity){ + try { + List voucherLogEntityList = aePushVoucherLogService.queryBill(entity); + return getSuccessMessageEntity("请求成功",voucherLogEntityList); + }catch (Exception e){ + e.printStackTrace(); + return getFailureMessageEntity(e.getMessage()); + } + } + + /** + * 查询明细 + */ + @RequestMapping(value = "/queryDetailsByBillCode", method = RequestMethod.POST) + public JsonResultEntity queryDetailsByBillCode(@RequestBody AePushVoucherLogEntity entity){ + try { + List voucherLogDetails = aePushVoucherLogService.queryDetailsByBillCode(entity); + return getSuccessMessageEntity("请求成功",voucherLogDetails); + }catch (Exception e){ + e.printStackTrace(); + return getFailureMessageEntity(e.getMessage()); + } + } + +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/dao/IAePushVoucherLogDao.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/dao/IAePushVoucherLogDao.java new file mode 100644 index 00000000..07945b96 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/dao/IAePushVoucherLogDao.java @@ -0,0 +1,15 @@ +package com.hzya.frame.voucher.ae.push.dao; + +import com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogEntity; +import com.hzya.frame.basedao.dao.IBaseDao; + +/** + * (ae_push_voucher_log: table)表数据库访问层 + * + * @author zydd + * @since 2025-07-17 16:35:30 + */ +public interface IAePushVoucherLogDao extends IBaseDao { + +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/dao/IAePushVoucherLogDetailsDao.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/dao/IAePushVoucherLogDetailsDao.java new file mode 100644 index 00000000..e90a515a --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/dao/IAePushVoucherLogDetailsDao.java @@ -0,0 +1,15 @@ +package com.hzya.frame.voucher.ae.push.dao; + +import com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogDetailsEntity; +import com.hzya.frame.basedao.dao.IBaseDao; + +/** + * 会计事项(accounting_event)-推送日志-明细表(ae_push_voucher_log_details: table)表数据库访问层 + * + * @author zydd + * @since 2025-07-25 09:52:37 + */ +public interface IAePushVoucherLogDetailsDao extends IBaseDao { + +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/dao/impl/AePushVoucherLogDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/dao/impl/AePushVoucherLogDaoImpl.java new file mode 100644 index 00000000..12b41112 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/dao/impl/AePushVoucherLogDaoImpl.java @@ -0,0 +1,17 @@ +package com.hzya.frame.voucher.ae.push.dao.impl; + +import com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogEntity; +import com.hzya.frame.voucher.ae.push.dao.IAePushVoucherLogDao; +import org.springframework.stereotype.Repository; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +/** + * (AePushVoucherLog)表数据库访问层 + * + * @author zydd + * @since 2025-07-17 16:35:30 + */ +@Repository +public class AePushVoucherLogDaoImpl extends MybatisGenericDao implements IAePushVoucherLogDao{ + +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/dao/impl/AePushVoucherLogDetailsDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/dao/impl/AePushVoucherLogDetailsDaoImpl.java new file mode 100644 index 00000000..e505e601 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/dao/impl/AePushVoucherLogDetailsDaoImpl.java @@ -0,0 +1,17 @@ +package com.hzya.frame.voucher.ae.push.dao.impl; + +import com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogDetailsEntity; +import com.hzya.frame.voucher.ae.push.dao.IAePushVoucherLogDetailsDao; +import org.springframework.stereotype.Repository; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +/** + * 会计事项(accounting_event)-推送日志-明细表(AePushVoucherLogDetails)表数据库访问层 + * + * @author zydd + * @since 2025-07-25 09:52:37 + */ +@Repository +public class AePushVoucherLogDetailsDaoImpl extends MybatisGenericDao implements IAePushVoucherLogDetailsDao{ + +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/entity/AePushVoucherLogDetailsEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/entity/AePushVoucherLogDetailsEntity.java new file mode 100644 index 00000000..3542cc6c --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/entity/AePushVoucherLogDetailsEntity.java @@ -0,0 +1,253 @@ +package com.hzya.frame.voucher.ae.push.entity; + +import java.util.Date; +import com.hzya.frame.web.entity.BaseEntity; +/** + * 会计事项(accounting_event)-推送日志-明细表(AePushVoucherLogDetails)实体类 + * + * @author zydd + * @since 2025-07-25 09:52:37 + */ +public class AePushVoucherLogDetailsEntity extends BaseEntity { + + /** 凭证日志主表id */ + private Long voucherId; + /** 摘要 */ + private String abstractStr; + /** 科目id */ + private String pkAccsubj; + private String subjcode; + private String subjname; + private String subjdispname; + /** 辅助核算str */ + private String assist; + /** 币种编码 */ + private String currencyCode; + /** 币种名称 */ + private String currencyName; + /** 借方原币 */ + private String jYbSum; + /** 借方本币 */ + private String jBbSum; + /** 贷方原币 */ + private String dYbSum; + /** 贷方本币 */ + private String dBbSum; + private String def1; + private String def2; + private String def3; + private String def4; + private String def5; + private String def6; + private String def7; + private String def8; + private String def9; + private String def10; + /** 创建人 */ + private String createUser; + /** 修改人 */ + private String modifyUser; + + + public Long getVoucherId() { + return voucherId; + } + + public void setVoucherId(Long voucherId) { + this.voucherId = voucherId; + } + + public String getAbstractStr() { + return abstractStr; + } + + public void setAbstractStr(String abstractStr) { + this.abstractStr = abstractStr; + } + + public String getPkAccsubj() { + return pkAccsubj; + } + + public void setPkAccsubj(String pkAccsubj) { + this.pkAccsubj = pkAccsubj; + } + + public String getSubjcode() { + return subjcode; + } + + public void setSubjcode(String subjcode) { + this.subjcode = subjcode; + } + + public String getSubjname() { + return subjname; + } + + public void setSubjname(String subjname) { + this.subjname = subjname; + } + + public String getSubjdispname() { + return subjdispname; + } + + public void setSubjdispname(String subjdispname) { + this.subjdispname = subjdispname; + } + + public String getAssist() { + return assist; + } + + public void setAssist(String assist) { + this.assist = assist; + } + + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + public String getCurrencyName() { + return currencyName; + } + + public void setCurrencyName(String currencyName) { + this.currencyName = currencyName; + } + + public String getJYbSum() { + return jYbSum; + } + + public void setJYbSum(String jYbSum) { + this.jYbSum = jYbSum; + } + + public String getJBbSum() { + return jBbSum; + } + + public void setJBbSum(String jBbSum) { + this.jBbSum = jBbSum; + } + + public String getDYbSum() { + return dYbSum; + } + + public void setDYbSum(String dYbSum) { + this.dYbSum = dYbSum; + } + + public String getDBbSum() { + return dBbSum; + } + + public void setDBbSum(String dBbSum) { + this.dBbSum = dBbSum; + } + + public String getDef1() { + return def1; + } + + public void setDef1(String def1) { + this.def1 = def1; + } + + public String getDef2() { + return def2; + } + + public void setDef2(String def2) { + this.def2 = def2; + } + + public String getDef3() { + return def3; + } + + public void setDef3(String def3) { + this.def3 = def3; + } + + public String getDef4() { + return def4; + } + + public void setDef4(String def4) { + this.def4 = def4; + } + + public String getDef5() { + return def5; + } + + public void setDef5(String def5) { + this.def5 = def5; + } + + public String getDef6() { + return def6; + } + + public void setDef6(String def6) { + this.def6 = def6; + } + + public String getDef7() { + return def7; + } + + public void setDef7(String def7) { + this.def7 = def7; + } + + public String getDef8() { + return def8; + } + + public void setDef8(String def8) { + this.def8 = def8; + } + + public String getDef9() { + return def9; + } + + public void setDef9(String def9) { + this.def9 = def9; + } + + public String getDef10() { + return def10; + } + + public void setDef10(String def10) { + this.def10 = def10; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getModifyUser() { + return modifyUser; + } + + public void setModifyUser(String modifyUser) { + this.modifyUser = modifyUser; + } + +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/entity/AePushVoucherLogDetailsEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/entity/AePushVoucherLogDetailsEntity.xml new file mode 100644 index 00000000..6c84e9ae --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/entity/AePushVoucherLogDetailsEntity.xml @@ -0,0 +1,445 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + ,voucher_id + ,abstract_str + ,pk_accsubj + ,subjcode + ,subjname + ,subjdispname + ,assist + ,currency_code + ,currency_name + ,j_yb_sum + ,j_bb_sum + ,d_yb_sum + ,d_bb_sum + ,def1 + ,def2 + ,def3 + ,def4 + ,def5 + ,def6 + ,def7 + ,def8 + ,def9 + ,def10 + ,create_time + ,create_user + ,modify_time + ,modify_user + ,sts + + + + + + + + + + + + + + + + insert into ae_push_voucher_log_details( + + id , + voucher_id , + abstract_str , + pk_accsubj , + subjcode , + subjname , + subjdispname , + assist , + currency_code , + currency_name , + j_yb_sum , + j_bb_sum , + d_yb_sum , + d_bb_sum , + def1 , + def2 , + def3 , + def4 , + def5 , + def6 , + def7 , + def8 , + def9 , + def10 , + create_time , + create_time , + create_user , + modify_time , + modify_time , + modify_user , + sts , + sts, + + )values( + + #{id} , + #{voucherId} , + #{abstractStr} , + #{pkAccsubj} , + #{subjcode} , + #{subjname} , + #{subjdispname} , + #{assist} , + #{currencyCode} , + #{currencyName} , + #{jYbSum} , + #{jBbSum} , + #{dYbSum} , + #{dBbSum} , + #{def1} , + #{def2} , + #{def3} , + #{def4} , + #{def5} , + #{def6} , + #{def7} , + #{def8} , + #{def9} , + #{def10} , + #{create_time} , + now() , + #{createUser} , + #{modify_time} , + now() , + #{modifyUser} , + #{sts} , + 'Y', + + ) + + + + insert into ae_push_voucher_log_details(voucher_id, abstract_str, pk_accsubj, subjcode, subjname, subjdispname, + assist, currency_code, currency_name, j_yb_sum, j_bb_sum, d_yb_sum, d_bb_sum, def1, def2, def3, def4, def5, + def6, def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts, sts) + values + + (#{entity.voucherId},#{entity.abstractStr},#{entity.pkAccsubj},#{entity.subjcode},#{entity.subjname},#{entity.subjdispname},#{entity.assist},#{entity.currencyCode},#{entity.currencyName},#{entity.jYbSum},#{entity.jBbSum},#{entity.dYbSum},#{entity.dBbSum},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts}, + 'Y') + + + + + insert into ae_push_voucher_log_details(voucher_id, abstract_str, pk_accsubj, subjcode, subjname, subjdispname, + assist, currency_code, currency_name, j_yb_sum, j_bb_sum, d_yb_sum, d_bb_sum, def1, def2, def3, def4, def5, + def6, def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts) + values + + (#{entity.voucherId},#{entity.abstractStr},#{entity.pkAccsubj},#{entity.subjcode},#{entity.subjname},#{entity.subjdispname},#{entity.assist},#{entity.currencyCode},#{entity.currencyName},#{entity.jYbSum},#{entity.jBbSum},#{entity.dYbSum},#{entity.dBbSum},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts}) + + on duplicate key update + voucher_id = values(voucher_id), + abstract_str = values(abstract_str), + pk_accsubj = values(pk_accsubj), + subjcode = values(subjcode), + subjname = values(subjname), + subjdispname = values(subjdispname), + assist = values(assist), + currency_code = values(currency_code), + currency_name = values(currency_name), + j_yb_sum = values(j_yb_sum), + j_bb_sum = values(j_bb_sum), + d_yb_sum = values(d_yb_sum), + d_bb_sum = values(d_bb_sum), + def1 = values(def1), + def2 = values(def2), + def3 = values(def3), + def4 = values(def4), + def5 = values(def5), + def6 = values(def6), + def7 = values(def7), + def8 = values(def8), + def9 = values(def9), + def10 = values(def10), + create_time = values(create_time), + create_user = values(create_user), + modify_time = values(modify_time), + modify_user = values(modify_user), + sts = values(sts) + + + + update ae_push_voucher_log_details set + + voucher_id = #{voucherId}, + abstract_str = #{abstractStr}, + pk_accsubj = #{pkAccsubj}, + subjcode = #{subjcode}, + subjname = #{subjname}, + subjdispname = #{subjdispname}, + assist = #{assist}, + currency_code = #{currencyCode}, + currency_name = #{currencyName}, + j_yb_sum = #{jYbSum}, + j_bb_sum = #{jBbSum}, + d_yb_sum = #{dYbSum}, + d_bb_sum = #{dBbSum}, + def1 = #{def1}, + def2 = #{def2}, + def3 = #{def3}, + def4 = #{def4}, + def5 = #{def5}, + def6 = #{def6}, + def7 = #{def7}, + def8 = #{def8}, + def9 = #{def9}, + def10 = #{def10}, + create_time = #{create_time}, + create_user = #{createUser}, + modify_time = #{modify_time}, + modify_time = now(), + modify_user = #{modifyUser}, + sts = #{sts}, + + where id = #{id} + + + + update ae_push_voucher_log_details + set sts= 'N', + modify_time = now() + where id = #{id} + + + + update ae_push_voucher_log_details set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} + + and id = #{id} + and voucher_id = #{voucherId} + and abstract_str = #{abstractStr} + and pk_accsubj = #{pkAccsubj} + and subjcode = #{subjcode} + and subjname = #{subjname} + and subjdispname = #{subjdispname} + and assist = #{assist} + and currency_code = #{currencyCode} + and currency_name = #{currencyName} + and j_yb_sum = #{jYbSum} + and j_bb_sum = #{jBbSum} + and d_yb_sum = #{dYbSum} + and d_bb_sum = #{dBbSum} + and def1 = #{def1} + and def2 = #{def2} + and def3 = #{def3} + and def4 = #{def4} + and def5 = #{def5} + and def6 = #{def6} + and def7 = #{def7} + and def8 = #{def8} + and def9 = #{def9} + and def10 = #{def10} + and create_user = #{createUser} + and modify_user = #{modifyUser} + and sts = #{sts} + and sts='Y' + + + + + delete + from ae_push_voucher_log_details + where id = #{id} + + + + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/entity/AePushVoucherLogEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/entity/AePushVoucherLogEntity.java new file mode 100644 index 00000000..ee4e328c --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/entity/AePushVoucherLogEntity.java @@ -0,0 +1,422 @@ +package com.hzya.frame.voucher.ae.push.entity; + +import java.util.Date; + +import com.hzya.frame.web.entity.BaseEntity; + +/** + * (AePushVoucherLog)实体类 + * + * @author zydd + * @since 2025-07-17 16:35:30 + */ +public class AePushVoucherLogEntity extends BaseEntity { + + /** + * 模块id + */ + private String mdmId; + /** + * 单据号 + */ + private String billCode; + /** + * 凭证模板类型id + */ + private String templateTypeId; + /** + * 凭证模板类型name + */ + private String templateTypeName; + /** + * 单据日期 + */ + private String billDate; + private String timeStart; + private String timeEnd; + /** + * Y/N + */ + private String billStatus; + /** + * 账簿主键 + */ + private String pkGlorgbook; + /** + * 账簿编码 + */ + private String glOrgbookCode; + /** + * 账簿名称 + */ + private String glOrgbookName; + /** + * 凭证类别id + */ + private String voucherTypeId; + /** + * 凭证类别名称 + */ + private String voucherTypeName; + /** + * 凭证号 + */ + private String voucherNo; + /** + * 摘要 + */ + private String abstractStr; + /** + * 借方原币 + */ + private String jYbSum; + /** + * 借方本币 + */ + private String jBbSum; + /** + * 贷方原币 + */ + private String dYbSum; + /** + * 贷方本币 + */ + private String dBbSum; + /** + * 推送元数据 + */ + private String pushData; + /** + * 推送入参 + */ + private String pushInfo; + /** + * 推送返回值 + */ + private String pushRes; + private String def1; + private String def2; + private String def3; + private String def4; + private String def5; + private String def6; + private String def7; + private String def8; + private String def9; + private String def10; + /** + * 创建人 + */ + private String createUser; + /** + * 修改人 + */ + private String modifyUser; + + + public String getMdmId() { + return mdmId; + } + + public void setMdmId(String mdmId) { + this.mdmId = mdmId; + } + + public String getBillCode() { + return billCode; + } + + public void setBillCode(String billCode) { + this.billCode = billCode; + } + + public String getTemplateTypeId() { + return templateTypeId; + } + + public void setTemplateTypeId(String templateTypeId) { + this.templateTypeId = templateTypeId; + } + + public String getTemplateTypeName() { + return templateTypeName; + } + + public void setTemplateTypeName(String templateTypeName) { + this.templateTypeName = templateTypeName; + } + + public String getBillDate() { + return billDate; + } + + public void setBillDate(String billDate) { + this.billDate = billDate; + } + + public String getBillStatus() { + return billStatus; + } + + public void setBillStatus(String billStatus) { + this.billStatus = billStatus; + } + + public String getPkGlorgbook() { + return pkGlorgbook; + } + + public void setPkGlorgbook(String pkGlorgbook) { + this.pkGlorgbook = pkGlorgbook; + } + + public String getGlOrgbookCode() { + return glOrgbookCode; + } + + public void setGlOrgbookCode(String glOrgbookCode) { + this.glOrgbookCode = glOrgbookCode; + } + + public String getGlOrgbookName() { + return glOrgbookName; + } + + public void setGlOrgbookName(String glOrgbookName) { + this.glOrgbookName = glOrgbookName; + } + + public String getVoucherTypeId() { + return voucherTypeId; + } + + public void setVoucherTypeId(String voucherTypeId) { + this.voucherTypeId = voucherTypeId; + } + + public String getVoucherTypeName() { + return voucherTypeName; + } + + public void setVoucherTypeName(String voucherTypeName) { + this.voucherTypeName = voucherTypeName; + } + + public String getVoucherNo() { + return voucherNo; + } + + public void setVoucherNo(String voucherNo) { + this.voucherNo = voucherNo; + } + + public String getAbstractStr() { + return abstractStr; + } + + public void setAbstractStr(String abstractStr) { + this.abstractStr = abstractStr; + } + + public String getJYbSum() { + return jYbSum; + } + + public void setJYbSum(String jYbSum) { + this.jYbSum = jYbSum; + } + + public String getJBbSum() { + return jBbSum; + } + + public void setJBbSum(String jBbSum) { + this.jBbSum = jBbSum; + } + + public String getDYbSum() { + return dYbSum; + } + + public void setDYbSum(String dYbSum) { + this.dYbSum = dYbSum; + } + + public String getDBbSum() { + return dBbSum; + } + + public void setDBbSum(String dBbSum) { + this.dBbSum = dBbSum; + } + + public String getPushData() { + return pushData; + } + + public void setPushData(String pushData) { + this.pushData = pushData; + } + + public String getPushInfo() { + return pushInfo; + } + + public void setPushInfo(String pushInfo) { + this.pushInfo = pushInfo; + } + + public String getPushRes() { + return pushRes; + } + + public void setPushRes(String pushRes) { + this.pushRes = pushRes; + } + + public String getDef1() { + return def1; + } + + public void setDef1(String def1) { + this.def1 = def1; + } + + public String getDef2() { + return def2; + } + + public void setDef2(String def2) { + this.def2 = def2; + } + + public String getDef3() { + return def3; + } + + public void setDef3(String def3) { + this.def3 = def3; + } + + public String getDef4() { + return def4; + } + + public void setDef4(String def4) { + this.def4 = def4; + } + + public String getDef5() { + return def5; + } + + public void setDef5(String def5) { + this.def5 = def5; + } + + public String getDef6() { + return def6; + } + + public void setDef6(String def6) { + this.def6 = def6; + } + + public String getDef7() { + return def7; + } + + public void setDef7(String def7) { + this.def7 = def7; + } + + public String getDef8() { + return def8; + } + + public void setDef8(String def8) { + this.def8 = def8; + } + + public String getDef9() { + return def9; + } + + public void setDef9(String def9) { + this.def9 = def9; + } + + public String getDef10() { + return def10; + } + + public void setDef10(String def10) { + this.def10 = def10; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getModifyUser() { + return modifyUser; + } + + public void setModifyUser(String modifyUser) { + this.modifyUser = modifyUser; + } + + + public String getTimeStart() { + return timeStart; + } + + public void setTimeStart(String timeStart) { + this.timeStart = timeStart; + } + + public String getTimeEnd() { + return timeEnd; + } + + public void setTimeEnd(String timeEnd) { + this.timeEnd = timeEnd; + } + + public String getjYbSum() { + return jYbSum; + } + + public void setjYbSum(String jYbSum) { + this.jYbSum = jYbSum; + } + + public String getjBbSum() { + return jBbSum; + } + + public void setjBbSum(String jBbSum) { + this.jBbSum = jBbSum; + } + + public String getdYbSum() { + return dYbSum; + } + + public void setdYbSum(String dYbSum) { + this.dYbSum = dYbSum; + } + + public String getdBbSum() { + return dBbSum; + } + + public void setdBbSum(String dBbSum) { + this.dBbSum = dBbSum; + } +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/entity/AePushVoucherLogEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/entity/AePushVoucherLogEntity.xml new file mode 100644 index 00000000..5152df0d --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/entity/AePushVoucherLogEntity.xml @@ -0,0 +1,539 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + ,mdm_id + ,bill_code + ,template_type_id + ,template_type_name + ,bill_date + ,bill_status + ,pk_glorgbook + ,gl_orgbook_code + ,gl_orgbook_name + ,voucher_type_id + ,voucher_type_name + ,voucher_no + ,abstract_str + ,j_yb_sum + ,j_bb_sum + ,d_yb_sum + ,d_bb_sum + ,push_data + ,push_info + ,push_res + ,def1 + ,def2 + ,def3 + ,def4 + ,def5 + ,def6 + ,def7 + ,def8 + ,def9 + ,def10 + ,create_time + ,create_user + ,modify_time + ,modify_user + ,sts + + + + + + + + + + + + + + + + insert into ae_push_voucher_log( + + id , + mdm_id , + bill_code , + template_type_id , + template_type_name , + bill_date , + bill_status , + pk_glorgbook , + gl_orgbook_code , + gl_orgbook_name , + voucher_type_id , + voucher_type_name , + voucher_no , + abstract_str , + j_yb_sum , + j_bb_sum , + d_yb_sum , + d_bb_sum , + push_data , + push_info , + push_res , + def1 , + def2 , + def3 , + def4 , + def5 , + def6 , + def7 , + def8 , + def9 , + def10 , + create_time , + create_time , + create_user , + modify_time , + modify_time , + modify_user , + sts , + sts, + + )values( + + #{id} , + #{mdmId} , + #{billCode} , + #{templateTypeId} , + #{templateTypeName} , + #{billDate} , + #{billStatus} , + #{pkGlorgbook} , + #{glOrgbookCode} , + #{glOrgbookName} , + #{voucherTypeId} , + #{voucherTypeName} , + #{voucherNo} , + #{abstractStr} , + #{jYbSum} , + #{jBbSum} , + #{dYbSum} , + #{dBbSum} , + #{pushData} , + #{pushInfo} , + #{pushRes} , + #{def1} , + #{def2} , + #{def3} , + #{def4} , + #{def5} , + #{def6} , + #{def7} , + #{def8} , + #{def9} , + #{def10} , + #{create_time} , + now() , + #{createUser} , + #{modify_time} , + now() , + #{modifyUser} , + #{sts} , + 'Y', + + ) + + + + insert into ae_push_voucher_log(mdm_id, bill_code, template_type_id, template_type_name, bill_date, bill_status, + pk_glorgbook, gl_orgbook_code, gl_orgbook_name, voucher_type_id, voucher_type_name, voucher_no, abstract_str, + j_yb_sum, j_bb_sum, d_yb_sum, d_bb_sum, push_data, push_info, push_res, def1, def2, def3, def4, def5, def6, + def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts, sts) + values + + (#{entity.mdmId},#{entity.billCode},#{entity.templateTypeId},#{entity.templateTypeName},#{entity.billDate},#{entity.billStatus},#{entity.pkGlorgbook},#{entity.glOrgbookCode},#{entity.glOrgbookName},#{entity.voucherTypeId},#{entity.voucherTypeName},#{entity.voucherNo},#{entity.abstractStr},#{entity.jYbSum},#{entity.jBbSum},#{entity.dYbSum},#{entity.dBbSum},#{entity.pushData},#{entity.pushInfo},#{entity.pushRes},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts}, + 'Y') + + + + + insert into ae_push_voucher_log(mdm_id, bill_code, template_type_id, template_type_name, bill_date, bill_status, + pk_glorgbook, gl_orgbook_code, gl_orgbook_name, voucher_type_id, voucher_type_name, voucher_no, abstract_str, + j_yb_sum, j_bb_sum, d_yb_sum, d_bb_sum, push_data, push_info, push_res, def1, def2, def3, def4, def5, def6, + def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts) + values + + (#{entity.mdmId},#{entity.billCode},#{entity.templateTypeId},#{entity.templateTypeName},#{entity.billDate},#{entity.billStatus},#{entity.pkGlorgbook},#{entity.glOrgbookCode},#{entity.glOrgbookName},#{entity.voucherTypeId},#{entity.voucherTypeName},#{entity.voucherNo},#{entity.abstractStr},#{entity.jYbSum},#{entity.jBbSum},#{entity.dYbSum},#{entity.dBbSum},#{entity.pushData},#{entity.pushInfo},#{entity.pushRes},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts}) + + on duplicate key update + mdm_id = values(mdm_id), + bill_code = values(bill_code), + template_type_id = values(template_type_id), + template_type_name = values(template_type_name), + bill_date = values(bill_date), + bill_status = values(bill_status), + pk_glorgbook = values(pk_glorgbook), + gl_orgbook_code = values(gl_orgbook_code), + gl_orgbook_name = values(gl_orgbook_name), + voucher_type_id = values(voucher_type_id), + voucher_type_name = values(voucher_type_name), + voucher_no = values(voucher_no), + abstract_str = values(abstract_str), + j_yb_sum = values(j_yb_sum), + j_bb_sum = values(j_bb_sum), + d_yb_sum = values(d_yb_sum), + d_bb_sum = values(d_bb_sum), + push_data = values(push_data), + push_info = values(push_info), + push_res = values(push_res), + def1 = values(def1), + def2 = values(def2), + def3 = values(def3), + def4 = values(def4), + def5 = values(def5), + def6 = values(def6), + def7 = values(def7), + def8 = values(def8), + def9 = values(def9), + def10 = values(def10), + create_time = values(create_time), + create_user = values(create_user), + modify_time = values(modify_time), + modify_user = values(modify_user), + sts = values(sts) + + + + update ae_push_voucher_log set + + mdm_id = #{mdmId}, + bill_code = #{billCode}, + template_type_id = #{templateTypeId}, + template_type_name = #{templateTypeName}, + + bill_date = #{billDate}, + bill_status = #{billStatus}, + pk_glorgbook = #{pkGlorgbook}, + gl_orgbook_code = #{glOrgbookCode}, + gl_orgbook_name = #{glOrgbookName}, + voucher_type_id = #{voucherTypeId}, + voucher_type_name = #{voucherTypeName}, + voucher_no = #{voucherNo}, + abstract_str = #{abstractStr}, + j_yb_sum = #{jYbSum}, + j_bb_sum = #{jBbSum}, + d_yb_sum = #{dYbSum}, + d_bb_sum = #{dBbSum}, + push_data = #{pushData}, + push_info = #{pushInfo}, + push_res = #{pushRes}, + def1 = #{def1}, + def2 = #{def2}, + def3 = #{def3}, + def4 = #{def4}, + def5 = #{def5}, + def6 = #{def6}, + def7 = #{def7}, + def8 = #{def8}, + def9 = #{def9}, + def10 = #{def10}, + create_time = #{create_time}, + create_user = #{createUser}, + modify_time = #{modify_time}, + modify_time = now(), + modify_user = #{modifyUser}, + sts = #{sts}, + + where id = #{id} + + + + update ae_push_voucher_log + set sts= 'N', + modify_time = now() + where id = #{id} + + + + update ae_push_voucher_log set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} + + and id = #{id} + and mdm_id = #{mdmId} + and bill_code = #{billCode} + and template_type_id = #{templateTypeId} + and template_type_name = + #{templateTypeName} + + and bill_date = #{billDate} + and bill_status = #{billStatus} + and pk_glorgbook = #{pkGlorgbook} + and gl_orgbook_code = #{glOrgbookCode} + and gl_orgbook_name = #{glOrgbookName} + and voucher_type_id = #{voucherTypeId} + and voucher_type_name = #{voucherTypeName} + and voucher_no = #{voucherNo} + and abstract_str = #{abstractStr} + and j_yb_sum = #{jYbSum} + and j_bb_sum = #{jBbSum} + and d_yb_sum = #{dYbSum} + and d_bb_sum = #{dBbSum} + and push_data = #{pushData} + and push_info = #{pushInfo} + and push_res = #{pushRes} + and def1 = #{def1} + and def2 = #{def2} + and def3 = #{def3} + and def4 = #{def4} + and def5 = #{def5} + and def6 = #{def6} + and def7 = #{def7} + and def8 = #{def8} + and def9 = #{def9} + and def10 = #{def10} + and create_user = #{createUser} + and modify_user = #{modifyUser} + and sts = #{sts} + and sts='Y' + + + + + delete + from ae_push_voucher_log + where id = #{id} + + + + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/service/IAePushVoucherLogDetailsService.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/service/IAePushVoucherLogDetailsService.java new file mode 100644 index 00000000..07d73e86 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/service/IAePushVoucherLogDetailsService.java @@ -0,0 +1,12 @@ +package com.hzya.frame.voucher.ae.push.service; + +import com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogDetailsEntity; +import com.hzya.frame.basedao.service.IBaseService; +/** + * 会计事项(accounting_event)-推送日志-明细表(AePushVoucherLogDetails)表服务接口 + * + * @author zydd + * @since 2025-07-25 09:52:37 + */ +public interface IAePushVoucherLogDetailsService extends IBaseService{ +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/service/IAePushVoucherLogService.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/service/IAePushVoucherLogService.java new file mode 100644 index 00000000..f1976941 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/service/IAePushVoucherLogService.java @@ -0,0 +1,19 @@ +package com.hzya.frame.voucher.ae.push.service; + +import com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogDetailsEntity; +import com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogEntity; +import com.hzya.frame.basedao.service.IBaseService; + +import java.util.List; + +/** + * (AePushVoucherLog)表服务接口 + * + * @author zydd + * @since 2025-07-17 16:35:30 + */ +public interface IAePushVoucherLogService extends IBaseService{ + List queryBill(AePushVoucherLogEntity entity); + + List queryDetailsByBillCode(AePushVoucherLogEntity entity); +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/service/impl/AePushVoucherLogDetailsServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/service/impl/AePushVoucherLogDetailsServiceImpl.java new file mode 100644 index 00000000..8dc0895e --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/service/impl/AePushVoucherLogDetailsServiceImpl.java @@ -0,0 +1,26 @@ +package com.hzya.frame.voucher.ae.push.service.impl; + +import com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogDetailsEntity; +import com.hzya.frame.voucher.ae.push.dao.IAePushVoucherLogDetailsDao; +import com.hzya.frame.voucher.ae.push.service.IAePushVoucherLogDetailsService; +import org.springframework.stereotype.Service; +import org.springframework.beans.factory.annotation.Autowired; +import javax.annotation.Resource; +import com.hzya.frame.basedao.service.impl.BaseService; +/** + * 会计事项(accounting_event)-推送日志-明细表(AePushVoucherLogDetails)表服务实现类 + * + * @author zydd + * @since 2025-07-25 09:52:37 + */ +@Service +public class AePushVoucherLogDetailsServiceImpl extends BaseService implements IAePushVoucherLogDetailsService { + + private IAePushVoucherLogDetailsDao aePushVoucherLogDetailsDao; + + @Autowired + public void setAePushVoucherLogDetailsDao(IAePushVoucherLogDetailsDao dao) { + this.aePushVoucherLogDetailsDao = dao; + this.dao = dao; + } +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/service/impl/AePushVoucherLogServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/service/impl/AePushVoucherLogServiceImpl.java new file mode 100644 index 00000000..51ed75bc --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/push/service/impl/AePushVoucherLogServiceImpl.java @@ -0,0 +1,157 @@ +package com.hzya.frame.voucher.ae.push.service.impl; + +import cn.hutool.core.lang.Assert; +import com.hzya.frame.voucher.ae.comf.bd.dao.IMdmDbFiledVODAO; +import com.hzya.frame.voucher.ae.comf.bd.entity.vo.MdmDbFiledVO; +import com.hzya.frame.voucher.ae.generate.core.service.ICoreService; +import com.hzya.frame.voucher.ae.generate.core.vo.CreateVoucherVO; +import com.hzya.frame.voucher.ae.push.dao.IAePushVoucherLogDetailsDao; +import com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogDetailsEntity; +import com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogEntity; +import com.hzya.frame.voucher.ae.push.dao.IAePushVoucherLogDao; +import com.hzya.frame.voucher.ae.push.service.IAePushVoucherLogService; +import groovy.lang.Lazy; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.beans.factory.annotation.Autowired; + +import javax.annotation.Resource; + +import com.hzya.frame.basedao.service.impl.BaseService; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * (AePushVoucherLog)表服务实现类 + * + * @author zydd + * @since 2025-07-17 16:35:30 + */ +@Service +public class AePushVoucherLogServiceImpl extends BaseService implements IAePushVoucherLogService { + + private IAePushVoucherLogDao aePushVoucherLogDao; + + @Autowired + public void setAePushVoucherLogDao(IAePushVoucherLogDao dao) { + this.aePushVoucherLogDao = dao; + this.dao = dao; + } + + + @Autowired + private ICoreService coreService; + @Autowired + private IMdmDbFiledVODAO mdmDbFiledVODAO; + @Autowired + private IAePushVoucherLogDetailsDao voucherLogDetailsDao; + + + @Override + public List queryBill(AePushVoucherLogEntity entity) { + Assert.notNull(entity.getMdmId(), "mdmId不能为空"); + + CreateVoucherVO createVoucherVO = new CreateVoucherVO(); + createVoucherVO.setMdmId(entity.getMdmId()); + if (entity.getTimeStart() != null && !"".equals(entity.getTimeStart())) { + createVoucherVO.setTimeStart(entity.getTimeStart()); + } + if (entity.getTimeEnd() != null && !"".equals(entity.getTimeEnd())) { + createVoucherVO.setTimeEnd(entity.getTimeEnd()); + } + + List> mapList = coreService.queryDataByMdmId(createVoucherVO); + + List allList = transData(entity.getMdmId(), mapList); + AePushVoucherLogEntity aePushVoucherLogEntity1 = new AePushVoucherLogEntity(); + aePushVoucherLogEntity1.setMdmId(entity.getMdmId()); + List pushData = aePushVoucherLogDao.query(aePushVoucherLogEntity1); + + for (AePushVoucherLogEntity allEntity : allList) { + for (AePushVoucherLogEntity pushEntity : pushData) { + if (allEntity.getBillCode().equals(pushEntity.getBillCode())) { + allEntity.setBillStatus("Y"); + allEntity.setPushInfo(pushEntity.getPushInfo()); + } else { + allEntity.setBillStatus("N"); +// allEntity.setPushInfo(pushEntity.getPushInfo()); + } + } + + } + System.out.println(allList); + String status = entity.getBillStatus(); + if (entity.getBillStatus() != null && !"".equals(entity.getBillStatus())) { + List statusList = new ArrayList<>(); + for (AePushVoucherLogEntity aePushVoucherLogEntity : allList) { + if (status.equals(aePushVoucherLogEntity.getBillStatus())) { + statusList.add(aePushVoucherLogEntity); + } + } + + for (AePushVoucherLogEntity aePushVoucherLogEntity : statusList) { + queryByBillCodeAndStatueY(aePushVoucherLogEntity); + } + + return statusList; + } + + for (AePushVoucherLogEntity aePushVoucherLogEntity : allList) { + queryByBillCodeAndStatueY(aePushVoucherLogEntity); + } + return allList; + + + } + + @Override + public List queryDetailsByBillCode(AePushVoucherLogEntity entity) { + Assert.notNull(entity.getId(), "id不能为空"); +// Assert.notNull(entity.getMdmId(), "mdmId不能为空"); +// Assert.notNull(entity.getBillCode(), "billCode不能为空"); + + //分录信息 + AePushVoucherLogDetailsEntity aePushVoucherLogDetailsEntity = new AePushVoucherLogDetailsEntity(); + aePushVoucherLogDetailsEntity.setVoucherId(Long.valueOf(entity.getId())); + List voucherLogDetailsEntityList = voucherLogDetailsDao.query(aePushVoucherLogDetailsEntity); + + return voucherLogDetailsEntityList; + } + + /** + * bill_code单据编码 + * bill_date单据日期 + */ + public List transData(String mdmId, List> mapList) { + System.out.println(mapList); + List all = new ArrayList<>(); + for (Map stringObjectMap : mapList) { + if (stringObjectMap != null) { + AePushVoucherLogEntity aePushVoucherLogEntity = new AePushVoucherLogEntity(); + aePushVoucherLogEntity.setBillCode(stringObjectMap.get("bill_code").toString()); + aePushVoucherLogEntity.setBillDate(stringObjectMap.get("bill_date").toString().substring(0, 10)); + all.add(aePushVoucherLogEntity); + } + } + List sortedList = all.stream() + .sorted(Comparator.comparing(AePushVoucherLogEntity::getBillDate).reversed()) + .collect(Collectors.toList()); + return sortedList; + } + + public void queryByBillCodeAndStatueY(AePushVoucherLogEntity aePushVoucherLogEntity) { + System.out.println(aePushVoucherLogEntity); + if ("Y".equals(aePushVoucherLogEntity.getBillStatus())) { + AePushVoucherLogEntity aePushVoucherLogEntity1 = new AePushVoucherLogEntity(); + aePushVoucherLogEntity1.setMdmId(aePushVoucherLogEntity.getMdmId()); + aePushVoucherLogEntity1.setBillCode(aePushVoucherLogEntity.getBillCode()); + List query = aePushVoucherLogDao.query(aePushVoucherLogEntity1); + if (query.size() != 0) { + BeanUtils.copyProperties(query.get(0), aePushVoucherLogEntity); + } + } + + + } +}