1、查询分录明细字段优化

This commit is contained in:
zhengyf 2025-08-07 14:41:46 +08:00
parent b88a373432
commit 5ce6dcc407
10 changed files with 429 additions and 270 deletions

View File

@ -47,13 +47,13 @@ public class CoreController extends DefaultController {
public JsonResultEntity generateVoucher(@RequestBody CreateVoucherVO createVoucherVO) { public JsonResultEntity generateVoucher(@RequestBody CreateVoucherVO createVoucherVO) {
try { try {
String billCodes = createVoucherVO.getBillCode(); String billCodes = createVoucherVO.getBill_code();
String[] split = billCodes.split(","); String[] split = billCodes.split(",");
Set<String> set = new LinkedHashSet<>(Arrays.asList(split)); Set<String> set = new LinkedHashSet<>(Arrays.asList(split));
String[] uniqueArray = set.toArray(new String[0]); String[] uniqueArray = set.toArray(new String[0]);
for (String s : uniqueArray) { for (String s : uniqueArray) {
createVoucherVO.setBillCode(s); createVoucherVO.setBill_code(s);
coreService.generateVoucher(createVoucherVO); coreService.generateVoucher(createVoucherVO);
} }

View File

@ -174,7 +174,7 @@ public class ICoreServiceImpl implements ICoreService {
String date = null; String date = null;
try { try {
Assert.notNull(createVoucherVO.getMdmId(), "生成凭证时主数据id不能为空"); Assert.notNull(createVoucherVO.getMdmId(), "生成凭证时主数据id不能为空");
Assert.notNull(createVoucherVO.getBillCode(), "生成凭证时,单据编号不能为空"); Assert.notNull(createVoucherVO.getBill_code(), "生成凭证时,单据编号不能为空");
MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity(); MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
mdmModuleDbEntity.setDbType("1"); mdmModuleDbEntity.setDbType("1");
@ -198,7 +198,7 @@ public class ICoreServiceImpl implements ICoreService {
MdmDBQueryVO mdmDBQueryVO = new MdmDBQueryVO(); MdmDBQueryVO mdmDBQueryVO = new MdmDBQueryVO();
mdmDBQueryVO.setTablename(mdmModuleDb.getDbName()); mdmDBQueryVO.setTablename(mdmModuleDb.getDbName());
mdmDBQueryVO.setProp6("bill_code"); mdmDBQueryVO.setProp6("bill_code");
mdmDBQueryVO.setPropValue6(createVoucherVO.getBillCode()); mdmDBQueryVO.setPropValue6(createVoucherVO.getBill_code());
List<Map<String, Object>> dataMapList = mdmDBQueryVODAO.queryMdmDb(mdmDBQueryVO); List<Map<String, Object>> dataMapList = mdmDBQueryVODAO.queryMdmDb(mdmDBQueryVO);
//获取汇总规则 //获取汇总规则
@ -226,7 +226,7 @@ public class ICoreServiceImpl implements ICoreService {
Map<List<Object>, List<Map<String, Object>>> groupedResultDate = dataMapList.stream().collect(Collectors.groupingBy(grouperDate)); Map<List<Object>, List<Map<String, Object>>> groupedResultDate = dataMapList.stream().collect(Collectors.groupingBy(grouperDate));
Set<List<Object>> dateList = groupedResultDate.keySet(); Set<List<Object>> dateList = groupedResultDate.keySet();
if (dateList.size() == 0 || dateList.size() > 1) { if (dateList.size() == 0 || dateList.size() > 1) {
Assert.state(false, "该单据日期查询失败,为查询到单据日期或单据日期不唯一,请检查单据信息->mdmId:{},bill_code:{}。", createVoucherVO.getMdmId(), createVoucherVO.getBillCode()); Assert.state(false, "该单据日期查询失败,为查询到单据日期或单据日期不唯一,请检查单据信息->mdmId:{},bill_code:{}。", createVoucherVO.getMdmId(), createVoucherVO.getBill_code());
} }
String ts = dateList.iterator().next().get(0).toString(); String ts = dateList.iterator().next().get(0).toString();
date = ts.substring(0, 10); date = ts.substring(0, 10);
@ -545,7 +545,7 @@ public class ICoreServiceImpl implements ICoreService {
//记录日志 //记录日志
saveLog("Y",createVoucherVO.getBillCode(),null,createVoucherVO.getMdmId(),voucher); saveLog("Y",createVoucherVO.getBill_code(),null,createVoucherVO.getMdmId(),voucher);
} else {//按类型生成不同的凭证 } else {//按类型生成不同的凭证
//根据凭证类型分组 账簿主键+凭证类别+模板id //根据凭证类型分组 账簿主键+凭证类别+模板id
Map<String, List<AeConfVoucherTemplateEntity>> collectTempType = Map<String, List<AeConfVoucherTemplateEntity>> collectTempType =
@ -798,7 +798,7 @@ public class ICoreServiceImpl implements ICoreService {
vouche.setDetails(details); vouche.setDetails(details);
voucher.add(vouche); voucher.add(vouche);
//记录日志 //记录日志
saveLog("Y",createVoucherVO.getBillCode(),null,createVoucherVO.getMdmId(),voucher); saveLog("Y",createVoucherVO.getBill_code(),null,createVoucherVO.getMdmId(),voucher);
} }
@ -810,7 +810,7 @@ public class ICoreServiceImpl implements ICoreService {
//记录日志 //记录日志
AePushVoucherLogEntity aePushVoucherLogEntity = new AePushVoucherLogEntity(); AePushVoucherLogEntity aePushVoucherLogEntity = new AePushVoucherLogEntity();
aePushVoucherLogEntity.setMdmId(createVoucherVO.getMdmId()); aePushVoucherLogEntity.setMdmId(createVoucherVO.getMdmId());
aePushVoucherLogEntity.setBillCode(createVoucherVO.getBillCode()); aePushVoucherLogEntity.setBill_code(createVoucherVO.getBill_code());
aePushVoucherLogEntity.setBillStatus("N"); aePushVoucherLogEntity.setBillStatus("N");
aePushVoucherLogEntity.setBillDate(date); aePushVoucherLogEntity.setBillDate(date);
aePushVoucherLogEntity.setPushRes(e.getMessage()); aePushVoucherLogEntity.setPushRes(e.getMessage());
@ -1969,7 +1969,7 @@ public class ICoreServiceImpl implements ICoreService {
System.out.println(voucher.getDetails()); System.out.println(voucher.getDetails());
AePushVoucherLogEntity voucherLogEntity = new AePushVoucherLogEntity(); AePushVoucherLogEntity voucherLogEntity = new AePushVoucherLogEntity();
voucherLogEntity.setMdmId(mdmId);//业务id voucherLogEntity.setMdmId(mdmId);//业务id
voucherLogEntity.setBillCode(billCode);//单据号 voucherLogEntity.setBill_code(billCode);//单据号
voucherLogEntity.setTemplateTypeId(null);//凭证类别id voucherLogEntity.setTemplateTypeId(null);//凭证类别id
voucherLogEntity.setBillStatus(status);//推送状态 voucherLogEntity.setBillStatus(status);//推送状态
voucherLogEntity.setBillDate(voucher.getPrepareddate());//单据日期 voucherLogEntity.setBillDate(voucher.getPrepareddate());//单据日期

View File

@ -18,7 +18,7 @@ public class CreateVoucherVO extends BaseEntity {
/** /**
* 单据编码 * 单据编码
*/ */
private String billCode; private String bill_code;
private String timeStart; private String timeStart;
private String timeEnd; private String timeEnd;
/** /**

View File

@ -32,34 +32,34 @@ public class PushLogController extends DefaultController {
private IAePushVoucherLogService aePushVoucherLogService; private IAePushVoucherLogService aePushVoucherLogService;
/** // /**
* 查询单据根据状态 // * 查询单据根据状态
* 以mdm为准查询所有单据过滤日志表 // * 以mdm为准查询所有单据过滤日志表
*/ // */
@RequestMapping(value = "/queryBill", method = RequestMethod.POST) // @RequestMapping(value = "/queryBill", method = RequestMethod.POST)
public JsonResultEntity queryBill(@RequestBody AePushVoucherLogEntity entity) { // public JsonResultEntity queryBill(@RequestBody AePushVoucherLogEntity entity) {
try { // try {
List<AePushVoucherLogEntity> voucherLogEntityList = aePushVoucherLogService.queryBill(entity); // List<AePushVoucherLogEntity> voucherLogEntityList = aePushVoucherLogService.queryBill(entity);
return getSuccessMessageEntity("请求成功", voucherLogEntityList); // return getSuccessMessageEntity("请求成功", voucherLogEntityList);
} catch (Exception e) { // } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
return getFailureMessageEntity(e.getMessage()); // return getFailureMessageEntity(e.getMessage());
} // }
} // }
//
/** // /**
* 查询明细 // * 查询明细
*/ // */
@RequestMapping(value = "/queryDetailsByBillCode", method = RequestMethod.POST) // @RequestMapping(value = "/queryDetailsByBillCode", method = RequestMethod.POST)
public JsonResultEntity queryDetailsByBillCode(@RequestBody AePushVoucherLogEntity entity) { // public JsonResultEntity queryDetailsByBillCode(@RequestBody AePushVoucherLogEntity entity) {
try { // try {
List<AePushVoucherLogDetailsEntity> voucherLogDetails = aePushVoucherLogService.queryDetailsByBillCode(entity); // List<AePushVoucherLogDetailsEntity> voucherLogDetails = aePushVoucherLogService.queryDetailsByBillCode(entity);
return getSuccessMessageEntity("请求成功", voucherLogDetails); // return getSuccessMessageEntity("请求成功", voucherLogDetails);
} catch (Exception e) { // } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
return getFailureMessageEntity(e.getMessage()); // return getFailureMessageEntity(e.getMessage());
} // }
} // }
//查需所有单据带条件mdmId单据日期项目编码单据编号生成状态 //查需所有单据带条件mdmId单据日期项目编码单据编号生成状态
@RequestMapping(value = "/queryBillPaged", method = RequestMethod.POST) @RequestMapping(value = "/queryBillPaged", method = RequestMethod.POST)
@ -85,5 +85,19 @@ public class PushLogController extends DefaultController {
} }
} }
//查询分录信息根据mdmId+billcode-->在查明细
@RequestMapping(value = "/queryDetailsByBillCodeAndMdmId", method = RequestMethod.POST)
public JsonResultEntity queryDetailsByBillCodeAndMdmId(@RequestBody AePushVoucherLogEntity entity) {
try {
Assert.notNull(entity.getMdmId(), "mdmId不能为空");
Assert.notNull(entity.getBill_code(), "bill_code不能为空");
List<AePushVoucherLogDetailsEntity> Details = aePushVoucherLogService.queryDetailsByBillCodeAndMdmId(entity);
return getSuccessMessageEntity("请求成功", Details);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
} }

View File

@ -26,11 +26,11 @@ public class AePushVoucherLogDaoImpl extends MybatisGenericDao<AePushVoucherLogE
@Override @Override
public AePushVoucherLogEntity saveOrUpdateBymdmIdAndBillCodeAndTypeId(AePushVoucherLogEntity aePushVoucherLogEntity) { public AePushVoucherLogEntity saveOrUpdateBymdmIdAndBillCodeAndTypeId(AePushVoucherLogEntity aePushVoucherLogEntity) {
Assert.notNull(aePushVoucherLogEntity.getMdmId(), "根据mdmId,bill_code,typeId新增或修改日志时mdmId不能为空"); Assert.notNull(aePushVoucherLogEntity.getMdmId(), "根据mdmId,bill_code,typeId新增或修改日志时mdmId不能为空");
Assert.notNull(aePushVoucherLogEntity.getBillCode(), "根据mdmId,bill_code,billCode新增或修改日志时mdmId不能为空"); Assert.notNull(aePushVoucherLogEntity.getBill_code(), "根据mdmId,bill_code,billCode新增或修改日志时mdmId不能为空");
Assert.notNull(aePushVoucherLogEntity.getBillStatus(), "根据mdmId,bill_code,billStatus新增或修改日志时mdmId不能为空"); Assert.notNull(aePushVoucherLogEntity.getBillStatus(), "根据mdmId,bill_code,billStatus新增或修改日志时mdmId不能为空");
AePushVoucherLogEntity aePushVoucherLogEntity1 = new AePushVoucherLogEntity(); AePushVoucherLogEntity aePushVoucherLogEntity1 = new AePushVoucherLogEntity();
aePushVoucherLogEntity1.setMdmId(aePushVoucherLogEntity.getMdmId()); aePushVoucherLogEntity1.setMdmId(aePushVoucherLogEntity.getMdmId());
aePushVoucherLogEntity1.setBillCode(aePushVoucherLogEntity.getBillCode()); aePushVoucherLogEntity1.setBill_code(aePushVoucherLogEntity.getBill_code());
List<AePushVoucherLogEntity> query = this.query(aePushVoucherLogEntity1); List<AePushVoucherLogEntity> query = this.query(aePushVoucherLogEntity1);
if (query == null || query.size() == 0) { if (query == null || query.size() == 0) {
AePushVoucherLogEntity save = this.save(aePushVoucherLogEntity); AePushVoucherLogEntity save = this.save(aePushVoucherLogEntity);

View File

@ -9,7 +9,40 @@ import com.hzya.frame.web.entity.BaseEntity;
* @since 2025-07-25 09:52:37 * @since 2025-07-25 09:52:37
*/ */
public class AePushVoucherLogDetailsEntity extends BaseEntity { public class AePushVoucherLogDetailsEntity extends BaseEntity {
//表头补充
/**
* 凭证日期
*/
private String billDate;
/**
* 账簿主键
*/
private String pkGlorgbook;
/**
* 账簿编码
*/
private String glOrgbookCode;
/**
* 账簿名称
*/
private String glOrgbookName;
/**
* 凭证类别id
*/
private String voucherTypeId;
/**
* 凭证类别名称
*/
private String voucherTypeName;
/**
* 凭证号
*/
private String voucherNo;
/** 凭证日志主表id */ /** 凭证日志主表id */
private Long voucherId; private Long voucherId;
/** 摘要 */ /** 摘要 */
@ -249,5 +282,93 @@ public class AePushVoucherLogDetailsEntity extends BaseEntity {
this.modifyUser = modifyUser; this.modifyUser = modifyUser;
} }
public String getBillDate() {
return billDate;
}
public void setBillDate(String billDate) {
this.billDate = billDate;
}
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 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;
}
} }

View File

@ -20,7 +20,7 @@ public class AePushVoucherLogEntity extends BaseEntity {
/** /**
* 单据号 * 单据号
*/ */
private String billCode; private String bill_code;
/** /**
* 凭证模板类型id * 凭证模板类型id
*/ */
@ -123,12 +123,12 @@ public class AePushVoucherLogEntity extends BaseEntity {
this.mdmId = mdmId; this.mdmId = mdmId;
} }
public String getBillCode() { public String getBill_code() {
return billCode; return bill_code;
} }
public void setBillCode(String billCode) { public void setBill_code(String bill_code) {
this.billCode = billCode; this.bill_code = bill_code;
} }
public String getTemplateTypeId() { public String getTemplateTypeId() {

View File

@ -6,7 +6,7 @@
type="com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogEntity"> type="com.hzya.frame.voucher.ae.push.entity.AePushVoucherLogEntity">
<result property="id" column="id" jdbcType="INTEGER"/> <result property="id" column="id" jdbcType="INTEGER"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/> <result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="billCode" column="bill_code" jdbcType="VARCHAR"/> <result property="bill_code" column="bill_code" jdbcType="VARCHAR"/>
<result property="templateTypeId" column="template_type_id" jdbcType="VARCHAR"/> <result property="templateTypeId" column="template_type_id" jdbcType="VARCHAR"/>
<result property="templateTypeName" column="template_type_name" jdbcType="VARCHAR"/> <result property="templateTypeName" column="template_type_name" jdbcType="VARCHAR"/>
<result property="billDate" column="bill_date" jdbcType="VARCHAR"/> <result property="billDate" column="bill_date" jdbcType="VARCHAR"/>
@ -89,7 +89,7 @@
<trim prefix="where" prefixOverrides="and"> <trim prefix="where" prefixOverrides="and">
<if test="id != null">and id = #{id}</if> <if test="id != null">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if> <if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="billCode != null and billCode != ''">and bill_code = #{billCode}</if> <if test="bill_code != null and bill_code != ''">and bill_code = #{bill_code}</if>
<if test="templateTypeId != null and templateTypeId != ''">and template_type_id = #{templateTypeId}</if> <if test="templateTypeId != null and templateTypeId != ''">and template_type_id = #{templateTypeId}</if>
<if test="templateTypeName != null and templateTypeName != ''">and template_type_name = <if test="templateTypeName != null and templateTypeName != ''">and template_type_name =
#{templateTypeName} #{templateTypeName}
@ -136,7 +136,7 @@
<trim prefix="where" prefixOverrides="and"> <trim prefix="where" prefixOverrides="and">
<if test="id != null">and id = #{id}</if> <if test="id != null">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if> <if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="billCode != null and billCode != ''">and bill_code = #{billCode}</if> <if test="bill_code != null and bill_code != ''">and bill_code = #{bill_code}</if>
<if test="templateTypeId != null and templateTypeId != ''">and template_type_id = #{templateTypeId}</if> <if test="templateTypeId != null and templateTypeId != ''">and template_type_id = #{templateTypeId}</if>
<if test="templateTypeName != null and templateTypeName != ''">and template_type_name = <if test="templateTypeName != null and templateTypeName != ''">and template_type_name =
#{templateTypeName} #{templateTypeName}
@ -185,7 +185,7 @@
<trim prefix="where" prefixOverrides="and"> <trim prefix="where" prefixOverrides="and">
<if test="id != null">and id like concat('%',#{id},'%')</if> <if test="id != null">and id like concat('%',#{id},'%')</if>
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if> <if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if>
<if test="billCode != null and billCode != ''">and bill_code like concat('%',#{billCode},'%')</if> <if test="bill_code != null and bill_code != ''">and bill_code like concat('%',#{bill_code},'%')</if>
<if test="templateTypeId != null and templateTypeId != ''">and template_type_id like <if test="templateTypeId != null and templateTypeId != ''">and template_type_id like
concat('%',#{templateTypeId},'%') concat('%',#{templateTypeId},'%')
</if> </if>
@ -246,7 +246,7 @@
<trim prefix="where" prefixOverrides="and"> <trim prefix="where" prefixOverrides="and">
<if test="id != null">or id = #{id}</if> <if test="id != null">or id = #{id}</if>
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if> <if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if>
<if test="billCode != null and billCode != ''">or bill_code = #{billCode}</if> <if test="bill_code != null and bill_code != ''">or bill_code = #{bill_code}</if>
<if test="templateTypeId != null and templateTypeId != ''">or template_type_id = #{templateTypeId}</if> <if test="templateTypeId != null and templateTypeId != ''">or template_type_id = #{templateTypeId}</if>
<if test="templateTypeName != null and templateTypeName != ''">or template_type_name = #{templateTypeName} <if test="templateTypeName != null and templateTypeName != ''">or template_type_name = #{templateTypeName}
</if> </if>
@ -292,7 +292,7 @@
<trim suffix="" suffixOverrides=","> <trim suffix="" suffixOverrides=",">
<if test="id != null">id ,</if> <if test="id != null">id ,</if>
<if test="mdmId != null and mdmId != ''">mdm_id ,</if> <if test="mdmId != null and mdmId != ''">mdm_id ,</if>
<if test="billCode != null and billCode != ''">bill_code ,</if> <if test="bill_code != null and bill_code != ''">bill_code ,</if>
<if test="templateTypeId != null and templateTypeId != ''">template_type_id ,</if> <if test="templateTypeId != null and templateTypeId != ''">template_type_id ,</if>
<if test="templateTypeName != null and templateTypeName != ''">template_type_name ,</if> <if test="templateTypeName != null and templateTypeName != ''">template_type_name ,</if>
<if test="billDate != null">bill_date ,</if> <if test="billDate != null">bill_date ,</if>
@ -334,7 +334,7 @@
<trim suffix="" suffixOverrides=","> <trim suffix="" suffixOverrides=",">
<if test="id != null">#{id} ,</if> <if test="id != null">#{id} ,</if>
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</if> <if test="mdmId != null and mdmId != ''">#{mdmId} ,</if>
<if test="billCode != null and billCode != ''">#{billCode} ,</if> <if test="bill_code != null and bill_code != ''">#{bill_code} ,</if>
<if test="templateTypeId != null and templateTypeId != ''">#{templateTypeId} ,</if> <if test="templateTypeId != null and templateTypeId != ''">#{templateTypeId} ,</if>
<if test="templateTypeName != null and templateTypeName != ''">#{templateTypeName} ,</if> <if test="templateTypeName != null and templateTypeName != ''">#{templateTypeName} ,</if>
<if test="billDate != null">#{billDate} ,</if> <if test="billDate != null">#{billDate} ,</if>
@ -382,7 +382,7 @@
def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts, sts) def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts, sts)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{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}, (#{entity.mdmId},#{entity.bill_code},#{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') 'Y')
</foreach> </foreach>
</insert> </insert>
@ -394,7 +394,7 @@
def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts) def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{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}) (#{entity.mdmId},#{entity.bill_code},#{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})
</foreach> </foreach>
on duplicate key update on duplicate key update
mdm_id = values(mdm_id), mdm_id = values(mdm_id),
@ -438,7 +438,7 @@
update ae_push_voucher_log set update ae_push_voucher_log set
<trim suffix="" suffixOverrides=","> <trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if> <if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if> <if test="bill_code != null and bill_code != ''">bill_code = #{bill_code},</if>
<if test="templateTypeId != null and templateTypeId != ''">template_type_id = #{templateTypeId},</if> <if test="templateTypeId != null and templateTypeId != ''">template_type_id = #{templateTypeId},</if>
<if test="templateTypeName != null and templateTypeName != ''">template_type_name = #{templateTypeName}, <if test="templateTypeName != null and templateTypeName != ''">template_type_name = #{templateTypeName},
</if> </if>
@ -491,7 +491,7 @@
<trim prefix="where" prefixOverrides="and"> <trim prefix="where" prefixOverrides="and">
<if test="id != null">and id = #{id}</if> <if test="id != null">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if> <if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="billCode != null and billCode != ''">and bill_code = #{billCode}</if> <if test="bill_code != null and bill_code != ''">and bill_code = #{bill_code}</if>
<if test="templateTypeId != null and templateTypeId != ''">and template_type_id = #{templateTypeId}</if> <if test="templateTypeId != null and templateTypeId != ''">and template_type_id = #{templateTypeId}</if>
<if test="templateTypeName != null and templateTypeName != ''">and template_type_name = <if test="templateTypeName != null and templateTypeName != ''">and template_type_name =
#{templateTypeName} #{templateTypeName}

View File

@ -17,13 +17,15 @@ import java.util.Map;
* @since 2025-07-17 16:35:30 * @since 2025-07-17 16:35:30
*/ */
public interface IAePushVoucherLogService extends IBaseService<AePushVoucherLogEntity, String>{ public interface IAePushVoucherLogService extends IBaseService<AePushVoucherLogEntity, String>{
List<AePushVoucherLogEntity> queryBill(AePushVoucherLogEntity entity); // List<AePushVoucherLogEntity> queryBill(AePushVoucherLogEntity entity);
//
List<AePushVoucherLogDetailsEntity> queryDetailsByBillCode(AePushVoucherLogEntity entity); // List<AePushVoucherLogDetailsEntity> queryDetailsByBillCode(AePushVoucherLogEntity entity);
//
AePushVoucherLogEntity saveOrUpdateBymdmIdAndBillCodeAndTypeId(AePushVoucherLogEntity aePushVoucherLogEntity); // AePushVoucherLogEntity saveOrUpdateBymdmIdAndBillCodeAndTypeId(AePushVoucherLogEntity aePushVoucherLogEntity);
PageInfo queryBillPaged(CreateVoucherVO vo); PageInfo queryBillPaged(CreateVoucherVO vo);
MdmViewVo queryBillFileds(CreateVoucherVO vo); MdmViewVo queryBillFileds(CreateVoucherVO vo);
List<AePushVoucherLogDetailsEntity> queryDetailsByBillCodeAndMdmId(AePushVoucherLogEntity entity);
} }

View File

@ -161,137 +161,137 @@ public class AePushVoucherLogServiceImpl extends BaseService<AePushVoucherLogEnt
// } // }
@Override // @Override
public List<AePushVoucherLogEntity> queryBill(AePushVoucherLogEntity entity) { // public List<AePushVoucherLogEntity> queryBill(AePushVoucherLogEntity entity) {
Assert.notNull(entity.getMdmId(), "mdmId不能为空"); // Assert.notNull(entity.getMdmId(), "mdmId不能为空");
//
CreateVoucherVO createVoucherVO = new CreateVoucherVO(); // CreateVoucherVO createVoucherVO = new CreateVoucherVO();
createVoucherVO.setMdmId(entity.getMdmId()); // createVoucherVO.setMdmId(entity.getMdmId());
if (entity.getTimeStart() != null && !"".equals(entity.getTimeStart())) { // if (entity.getTimeStart() != null && !"".equals(entity.getTimeStart())) {
createVoucherVO.setTimeStart(entity.getTimeStart()); // createVoucherVO.setTimeStart(entity.getTimeStart());
} // }
if (entity.getTimeEnd() != null && !"".equals(entity.getTimeEnd())) { // if (entity.getTimeEnd() != null && !"".equals(entity.getTimeEnd())) {
createVoucherVO.setTimeEnd(entity.getTimeEnd()); // createVoucherVO.setTimeEnd(entity.getTimeEnd());
} // }
//
List<Map<String, Object>> mapList = coreService.queryDataByMdmId(createVoucherVO);//已被去重 // List<Map<String, Object>> mapList = coreService.queryDataByMdmId(createVoucherVO);//已被去重
//
List<AePushVoucherLogEntity> allList = transData(entity.getMdmId(), mapList); // List<AePushVoucherLogEntity> allList = transData(entity.getMdmId(), mapList);
AePushVoucherLogEntity aePushVoucherLogEntity1 = new AePushVoucherLogEntity(); // AePushVoucherLogEntity aePushVoucherLogEntity1 = new AePushVoucherLogEntity();
aePushVoucherLogEntity1.setMdmId(entity.getMdmId()); // aePushVoucherLogEntity1.setMdmId(entity.getMdmId());
List<AePushVoucherLogEntity> pushData = aePushVoucherLogDao.query(aePushVoucherLogEntity1); // List<AePushVoucherLogEntity> pushData = aePushVoucherLogDao.query(aePushVoucherLogEntity1);
//
for (AePushVoucherLogEntity allEntity : allList) { // for (AePushVoucherLogEntity allEntity : allList) {
for (AePushVoucherLogEntity pushEntity : pushData) { // for (AePushVoucherLogEntity pushEntity : pushData) {
if (allEntity.getBillCode().equals(pushEntity.getBillCode())) { // if (allEntity.getBillCode().equals(pushEntity.getBillCode())) {
allEntity.setBillStatus("Y"); // allEntity.setBillStatus("Y");
allEntity.setPushInfo(pushEntity.getPushInfo());
break;
} else {
allEntity.setBillStatus("N");
// allEntity.setPushInfo(pushEntity.getPushInfo()); // allEntity.setPushInfo(pushEntity.getPushInfo());
} // break;
} // } else {
// allEntity.setBillStatus("N");
} //// allEntity.setPushInfo(pushEntity.getPushInfo());
// }
List<AePushVoucherLogEntity> resList = new ArrayList<>(); // }
//
String billCode = entity.getBillCode(); // }
String status = entity.getBillStatus(); //
if("".equals(status)){ // List<AePushVoucherLogEntity> resList = new ArrayList<>();
status=null; //
} // String billCode = entity.getBillCode();
// String status = entity.getBillStatus();
//单据号 // if("".equals(status)){
if (billCode != null && status == null) { // status=null;
for (AePushVoucherLogEntity aePushVoucherLogEntity : allList) { // }
if (aePushVoucherLogEntity.getBillCode().contains(billCode)) { //
resList.add(aePushVoucherLogEntity); // //单据号
} // if (billCode != null && status == null) {
} // for (AePushVoucherLogEntity aePushVoucherLogEntity : allList) {
if (entity.getBillStatus() != null && !"".equals(entity.getBillStatus())) { // if (aePushVoucherLogEntity.getBillCode().contains(billCode)) {
List<AePushVoucherLogEntity> statusList = new ArrayList<>(); // resList.add(aePushVoucherLogEntity);
for (AePushVoucherLogEntity aePushVoucherLogEntity : resList) { // }
if (status.equals(aePushVoucherLogEntity.getBillStatus())) { // }
statusList.add(aePushVoucherLogEntity); // if (entity.getBillStatus() != null && !"".equals(entity.getBillStatus())) {
} // List<AePushVoucherLogEntity> statusList = new ArrayList<>();
} // for (AePushVoucherLogEntity aePushVoucherLogEntity : resList) {
// if (status.equals(aePushVoucherLogEntity.getBillStatus())) {
for (AePushVoucherLogEntity aePushVoucherLogEntity : statusList) { // statusList.add(aePushVoucherLogEntity);
queryByBillCodeAndStatueY(aePushVoucherLogEntity); // }
} // }
queryTempType(statusList); //
return statusList; // for (AePushVoucherLogEntity aePushVoucherLogEntity : statusList) {
} // queryByBillCodeAndStatueY(aePushVoucherLogEntity);
// }
for (AePushVoucherLogEntity aePushVoucherLogEntity : resList) { // queryTempType(statusList);
queryByBillCodeAndStatueY(aePushVoucherLogEntity); // return statusList;
} // }
//
// for (AePushVoucherLogEntity aePushVoucherLogEntity : resList) {
queryTempType(resList); // queryByBillCodeAndStatueY(aePushVoucherLogEntity);
return resList; // }
//
} //
//状态 // queryTempType(resList);
if (billCode == null && status != null) { // return resList;
if (entity.getBillStatus() != null && !"".equals(entity.getBillStatus())) { //
List<AePushVoucherLogEntity> statusList = new ArrayList<>(); // }
for (AePushVoucherLogEntity aePushVoucherLogEntity : allList) { // //状态
if (status.equals(aePushVoucherLogEntity.getBillStatus())) { // if (billCode == null && status != null) {
statusList.add(aePushVoucherLogEntity); // if (entity.getBillStatus() != null && !"".equals(entity.getBillStatus())) {
} // List<AePushVoucherLogEntity> statusList = new ArrayList<>();
} // for (AePushVoucherLogEntity aePushVoucherLogEntity : allList) {
// if (status.equals(aePushVoucherLogEntity.getBillStatus())) {
for (AePushVoucherLogEntity aePushVoucherLogEntity : statusList) { // statusList.add(aePushVoucherLogEntity);
queryByBillCodeAndStatueY(aePushVoucherLogEntity); // }
} // }
queryTempType(statusList); //
return statusList; // for (AePushVoucherLogEntity aePushVoucherLogEntity : statusList) {
} // queryByBillCodeAndStatueY(aePushVoucherLogEntity);
// }
for (AePushVoucherLogEntity aePushVoucherLogEntity : allList) { // queryTempType(statusList);
queryByBillCodeAndStatueY(aePushVoucherLogEntity); // return statusList;
} // }
//
// for (AePushVoucherLogEntity aePushVoucherLogEntity : allList) {
queryTempType(allList); // queryByBillCodeAndStatueY(aePushVoucherLogEntity);
return allList; // }
//
} //
//单据号+状态 // queryTempType(allList);
if (billCode != null && status != null) { // return allList;
for (AePushVoucherLogEntity aePushVoucherLogEntity : allList) { //
if (aePushVoucherLogEntity.getBillCode().contains(billCode)) { // }
resList.add(aePushVoucherLogEntity); // //单据号+状态
} // if (billCode != null && status != null) {
} // for (AePushVoucherLogEntity aePushVoucherLogEntity : allList) {
// if (aePushVoucherLogEntity.getBillCode().contains(billCode)) {
if (entity.getBillStatus() != null && !"".equals(entity.getBillStatus())) { // resList.add(aePushVoucherLogEntity);
List<AePushVoucherLogEntity> statusList = new ArrayList<>(); // }
for (AePushVoucherLogEntity aePushVoucherLogEntity : resList) { // }
if (status.equals(aePushVoucherLogEntity.getBillStatus())) { //
statusList.add(aePushVoucherLogEntity); // if (entity.getBillStatus() != null && !"".equals(entity.getBillStatus())) {
} // List<AePushVoucherLogEntity> statusList = new ArrayList<>();
} // for (AePushVoucherLogEntity aePushVoucherLogEntity : resList) {
for (AePushVoucherLogEntity aePushVoucherLogEntity : statusList) { // if (status.equals(aePushVoucherLogEntity.getBillStatus())) {
queryByBillCodeAndStatueY(aePushVoucherLogEntity); // statusList.add(aePushVoucherLogEntity);
} // }
queryTempType(statusList); // }
return statusList; // for (AePushVoucherLogEntity aePushVoucherLogEntity : statusList) {
} // queryByBillCodeAndStatueY(aePushVoucherLogEntity);
} // }
// queryTempType(statusList);
// return statusList;
for (AePushVoucherLogEntity aePushVoucherLogEntity : allList) { // }
queryByBillCodeAndStatueY(aePushVoucherLogEntity); // }
} //
//
queryTempType(allList); // for (AePushVoucherLogEntity aePushVoucherLogEntity : allList) {
return allList; // queryByBillCodeAndStatueY(aePushVoucherLogEntity);
} // }
//
// queryTempType(allList);
// return allList;
// }
//
//查需所有单据带条件mdmId单据日期项目编码project_id单据编号生成状态billstatus //查需所有单据带条件mdmId单据日期项目编码project_id单据编号生成状态billstatus
@Override @Override
public PageInfo queryBillPaged(CreateVoucherVO vo) { public PageInfo queryBillPaged(CreateVoucherVO vo) {
@ -336,7 +336,7 @@ public class AePushVoucherLogServiceImpl extends BaseService<AePushVoucherLogEnt
} }
mdmDBQueryVO.setProp5(codefieldname); mdmDBQueryVO.setProp5(codefieldname);
mdmDBQueryVO.setPropValue5(vo.getBillCode()); mdmDBQueryVO.setPropValue5(vo.getBill_code());
mdmDBQueryVO.setProp6("project_code"); mdmDBQueryVO.setProp6("project_code");
mdmDBQueryVO.setPropValue6(vo.getProjectId()); mdmDBQueryVO.setPropValue6(vo.getProjectId());
@ -417,91 +417,113 @@ public class AePushVoucherLogServiceImpl extends BaseService<AePushVoucherLogEnt
} }
@Override @Override
public List<AePushVoucherLogDetailsEntity> queryDetailsByBillCode(AePushVoucherLogEntity entity) { public List<AePushVoucherLogDetailsEntity> queryDetailsByBillCodeAndMdmId(AePushVoucherLogEntity entity) {
Assert.notNull(entity.getId(), "id不能为空"); List<AePushVoucherLogDetailsEntity> details=new ArrayList<>();
// Assert.notNull(entity.getMdmId(), "mdmId不能为空"); List<AePushVoucherLogEntity> query = aePushVoucherLogDao.query(entity);
// Assert.notNull(entity.getBillCode(), "billCode不能为空"); for (AePushVoucherLogEntity aePushVoucherLogEntity : query) {
AePushVoucherLogDetailsEntity logDetailsEntity = new AePushVoucherLogDetailsEntity();
//分录信息 logDetailsEntity.setVoucherId(Long.valueOf(aePushVoucherLogEntity.getId()));
AePushVoucherLogDetailsEntity aePushVoucherLogDetailsEntity = new AePushVoucherLogDetailsEntity(); List<AePushVoucherLogDetailsEntity> logDetails = voucherLogDetailsDao.query(logDetailsEntity);
aePushVoucherLogDetailsEntity.setVoucherId(Long.valueOf(entity.getId())); details.addAll(logDetails);
List<AePushVoucherLogDetailsEntity> voucherLogDetailsEntityList = voucherLogDetailsDao.query(aePushVoucherLogDetailsEntity); for (AePushVoucherLogDetailsEntity logDetail : logDetails) {
logDetail.setBillDate(aePushVoucherLogEntity.getBillDate());
return voucherLogDetailsEntityList; logDetail.setPkGlorgbook(aePushVoucherLogEntity.getPkGlorgbook());
} logDetail.setGlOrgbookCode(aePushVoucherLogEntity.getGlOrgbookCode());
logDetail.setGlOrgbookName(aePushVoucherLogEntity.getGlOrgbookName());
logDetail.setVoucherTypeId(aePushVoucherLogEntity.getVoucherTypeId());
/** logDetail.setVoucherTypeName(aePushVoucherLogEntity.getVoucherTypeName());
* bill_code单据编码 logDetail.setVoucherNo(aePushVoucherLogEntity.getVoucherNo());
* bill_date单据日期
*/
public List<AePushVoucherLogEntity> transData(String mdmId, List<Map<String, Object>> mapList) {
List<AePushVoucherLogEntity> all = new ArrayList<>();
for (Map<String, Object> 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<AePushVoucherLogEntity> sortedList = all.stream()
.sorted(Comparator.comparing(AePushVoucherLogEntity::getBillDate).reversed())
.collect(Collectors.toList());
return sortedList;
}
public void queryByBillCodeAndStatueY(AePushVoucherLogEntity aePushVoucherLogEntity) {
if ("Y".equals(aePushVoucherLogEntity.getBillStatus())) {
AePushVoucherLogEntity aePushVoucherLogEntity1 = new AePushVoucherLogEntity();
aePushVoucherLogEntity1.setMdmId(aePushVoucherLogEntity.getMdmId());
aePushVoucherLogEntity1.setBillCode(aePushVoucherLogEntity.getBillCode());
List<AePushVoucherLogEntity> query = aePushVoucherLogDao.query(aePushVoucherLogEntity1);
if (query.size() != 0) {
BeanUtils.copyProperties(query.get(0), aePushVoucherLogEntity);
} }
} }
return details;
} }
/** // @Override
* 根据单据编码查询是否生成了多张凭证 // public List<AePushVoucherLogDetailsEntity> queryDetailsByBillCode(AePushVoucherLogEntity entity) {
*/ // Assert.notNull(entity.getId(), "id不能为空");
public void queryTempType(List<AePushVoucherLogEntity> voucherLogEntityList) { //// Assert.notNull(entity.getMdmId(), "mdmId不能为空");
for (AePushVoucherLogEntity aePushVoucherLogEntity : voucherLogEntityList) { //// Assert.notNull(entity.getBillCode(), "billCode不能为空");
AePushVoucherLogEntity aePushVoucherLogEntity1 = new AePushVoucherLogEntity(); //
aePushVoucherLogEntity1.setBillCode(aePushVoucherLogEntity.getBillCode()); // //分录信息
List<AePushVoucherLogEntity> query = aePushVoucherLogDao.query(aePushVoucherLogEntity1); // AePushVoucherLogDetailsEntity aePushVoucherLogDetailsEntity = new AePushVoucherLogDetailsEntity();
aePushVoucherLogEntity.setLogList(query); // aePushVoucherLogDetailsEntity.setVoucherId(Long.valueOf(entity.getId()));
} // List<AePushVoucherLogDetailsEntity> voucherLogDetailsEntityList = voucherLogDetailsDao.query(aePushVoucherLogDetailsEntity);
} //
// return voucherLogDetailsEntityList;
// }
/** // /**
* 根据mdmId,bill_code,typeId新增或修改日志 // * bill_code单据编码
* 没数据则新增有数据判断Y/N // * bill_date单据日期
* N->N/Y 更新 // */
* Y->N/Y 返回null // public List<AePushVoucherLogEntity> transData(String mdmId, List<Map<String, Object>> mapList) {
*/ // List<AePushVoucherLogEntity> all = new ArrayList<>();
@Override // for (Map<String, Object> stringObjectMap : mapList) {
public AePushVoucherLogEntity saveOrUpdateBymdmIdAndBillCodeAndTypeId(AePushVoucherLogEntity aePushVoucherLogEntity) { // if (stringObjectMap != null) {
Assert.notNull(aePushVoucherLogEntity.getMdmId(), "根据mdmId,bill_code,typeId新增或修改日志时mdmId不能为空"); // AePushVoucherLogEntity aePushVoucherLogEntity = new AePushVoucherLogEntity();
Assert.notNull(aePushVoucherLogEntity.getBillCode(), "根据mdmId,bill_code,billCode新增或修改日志时mdmId不能为空"); // aePushVoucherLogEntity.setBillCode(stringObjectMap.get("bill_code").toString());
Assert.notNull(aePushVoucherLogEntity.getBillStatus(), "根据mdmId,bill_code,billStatus新增或修改日志时mdmId不能为空"); // aePushVoucherLogEntity.setBillDate(stringObjectMap.get("bill_date").toString().substring(0, 10));
AePushVoucherLogEntity aePushVoucherLogEntity1 = new AePushVoucherLogEntity(); // all.add(aePushVoucherLogEntity);
aePushVoucherLogEntity1.setMdmId(aePushVoucherLogEntity.getMdmId()); // }
aePushVoucherLogEntity1.setBillCode(aePushVoucherLogEntity.getBillCode()); // }
List<AePushVoucherLogEntity> query = aePushVoucherLogDao.query(aePushVoucherLogEntity1); // List<AePushVoucherLogEntity> sortedList = all.stream()
if (query == null || query.size() == 0) { // .sorted(Comparator.comparing(AePushVoucherLogEntity::getBillDate).reversed())
AePushVoucherLogEntity save = aePushVoucherLogDao.save(aePushVoucherLogEntity); // .collect(Collectors.toList());
return save; // return sortedList;
} else { // }
aePushVoucherLogDao.update(aePushVoucherLogEntity); //
return aePushVoucherLogEntity; // public void queryByBillCodeAndStatueY(AePushVoucherLogEntity aePushVoucherLogEntity) {
} // if ("Y".equals(aePushVoucherLogEntity.getBillStatus())) {
} // AePushVoucherLogEntity aePushVoucherLogEntity1 = new AePushVoucherLogEntity();
// aePushVoucherLogEntity1.setMdmId(aePushVoucherLogEntity.getMdmId());
// aePushVoucherLogEntity1.setBillCode(aePushVoucherLogEntity.getBillCode());
// List<AePushVoucherLogEntity> query = aePushVoucherLogDao.query(aePushVoucherLogEntity1);
// if (query.size() != 0) {
// BeanUtils.copyProperties(query.get(0), aePushVoucherLogEntity);
// }
// }
// }
//
//
// /**
// * 根据单据编码查询是否生成了多张凭证
// */
// public void queryTempType(List<AePushVoucherLogEntity> voucherLogEntityList) {
// for (AePushVoucherLogEntity aePushVoucherLogEntity : voucherLogEntityList) {
// AePushVoucherLogEntity aePushVoucherLogEntity1 = new AePushVoucherLogEntity();
// aePushVoucherLogEntity1.setBillCode(aePushVoucherLogEntity.getBillCode());
// List<AePushVoucherLogEntity> query = aePushVoucherLogDao.query(aePushVoucherLogEntity1);
// aePushVoucherLogEntity.setLogList(query);
// }
// }
//
//
// /**
// * 根据mdmId,bill_code,typeId新增或修改日志
// * 没数据则新增有数据判断Y/N
// * N->N/Y 更新
// * Y->N/Y 返回null
// */
// @Override
// public AePushVoucherLogEntity saveOrUpdateBymdmIdAndBillCodeAndTypeId(AePushVoucherLogEntity aePushVoucherLogEntity) {
// Assert.notNull(aePushVoucherLogEntity.getMdmId(), "根据mdmId,bill_code,typeId新增或修改日志时mdmId不能为空");
// Assert.notNull(aePushVoucherLogEntity.getBillCode(), "根据mdmId,bill_code,billCode新增或修改日志时mdmId不能为空");
// Assert.notNull(aePushVoucherLogEntity.getBillStatus(), "根据mdmId,bill_code,billStatus新增或修改日志时mdmId不能为空");
// AePushVoucherLogEntity aePushVoucherLogEntity1 = new AePushVoucherLogEntity();
// aePushVoucherLogEntity1.setMdmId(aePushVoucherLogEntity.getMdmId());
// aePushVoucherLogEntity1.setBillCode(aePushVoucherLogEntity.getBillCode());
// List<AePushVoucherLogEntity> query = aePushVoucherLogDao.query(aePushVoucherLogEntity1);
// if (query == null || query.size() == 0) {
// AePushVoucherLogEntity save = aePushVoucherLogDao.save(aePushVoucherLogEntity);
// return save;
// } else {
// aePushVoucherLogDao.update(aePushVoucherLogEntity);
// return aePushVoucherLogEntity;
// }
// }
private List<MdmViewFiledVo> getFiledByType(String viewType, List<MdmModuleViewDetailEntity> mdmModuleViewDetailEntities, List<MdmModuleDbEntity> mdmModuleDbEntityList, List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntityList, List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntityList) { private List<MdmViewFiledVo> getFiledByType(String viewType, List<MdmModuleViewDetailEntity> mdmModuleViewDetailEntities, List<MdmModuleDbEntity> mdmModuleDbEntityList, List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntityList, List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntityList) {
List<MdmViewFiledVo> mdmViewFiledVos = new ArrayList<>(); List<MdmViewFiledVo> mdmViewFiledVos = new ArrayList<>();
for (int i = 0; i < mdmModuleDbEntityList.size(); i++) { for (int i = 0; i < mdmModuleDbEntityList.size(); i++) {