1、优化生成逻辑
This commit is contained in:
parent
f7b681e421
commit
7657048c01
|
@ -22,8 +22,11 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
@ -354,6 +357,20 @@ public class AeConfVoucherTemplateServiceImpl extends BaseService<AeConfVoucherT
|
|||
}
|
||||
}
|
||||
|
||||
//根据正则切分减号
|
||||
if(!part.startsWith("(")&&!part.endsWith(")")&&part.split("-").length>1) {
|
||||
// 正则表达式:匹配-运算符
|
||||
Pattern pattern = Pattern.compile("[-]");
|
||||
Matcher matcher = pattern.matcher(part);
|
||||
int lastIndex = 0;
|
||||
while (matcher.find()) {
|
||||
// 更新索引位置
|
||||
lastIndex = matcher.end();
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (part.startsWith("@@$")) {
|
||||
String fieldPath = part.substring(3); // 去除 @@$
|
||||
if (!isValidFieldPath(entity.getMdmId(), fieldPath)) {
|
||||
|
|
|
@ -220,6 +220,9 @@ public class ICoreServiceImpl implements ICoreService {
|
|||
|
||||
//获取汇总规则
|
||||
String mergeRules = mdmModuleDb.getMergeRules();
|
||||
if(mergeRules==null){
|
||||
Assert.state(false,"请先配置业务数据的汇总规则");
|
||||
}
|
||||
String[] mergeRulesSplit = mergeRules.split(",");
|
||||
//查询汇总字段
|
||||
List<String> collectFileds = Arrays.stream(mergeRulesSplit).map(filedsMap::get).collect(Collectors.toList());
|
||||
|
@ -290,6 +293,9 @@ public class ICoreServiceImpl implements ICoreService {
|
|||
SysUserEntity sysUserEntity = new SysUserEntity();
|
||||
sysUserEntity.setId(String.valueOf(loginIdByToken));
|
||||
List<SysUserEntity> userEntityList = sysUserDao.query(sysUserEntity);
|
||||
if(userEntityList.size()==0){
|
||||
Assert.state(false,"登录过期,请重新登录");
|
||||
}
|
||||
String personId = userEntityList.get(0).getPersonId();
|
||||
SysPersonEntity sysPersonEntity = new SysPersonEntity();
|
||||
sysPersonEntity.setId(personId);
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.io.Serializable;
|
|||
* Created by zydd on 2025-07-10 11:20
|
||||
* 生成凭证参数
|
||||
*/
|
||||
@Data
|
||||
|
||||
public class CreateVoucherVO extends BaseEntity {
|
||||
/**
|
||||
* 主数据id
|
||||
|
@ -25,7 +25,7 @@ public class CreateVoucherVO extends BaseEntity {
|
|||
* 0 未生成 1 已生成 2 生成失败
|
||||
*/
|
||||
private String status;
|
||||
// private String billstatus;
|
||||
private String billstatus;
|
||||
private String billStatus;
|
||||
|
||||
private String targetDate;
|
||||
|
@ -43,6 +43,91 @@ public class CreateVoucherVO extends BaseEntity {
|
|||
private String examine_status;
|
||||
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
}
|
||||
|
||||
public void setMdmId(String mdmId) {
|
||||
this.mdmId = mdmId;
|
||||
}
|
||||
|
||||
public String getBill_code() {
|
||||
return bill_code;
|
||||
}
|
||||
|
||||
public void setBill_code(String bill_code) {
|
||||
this.bill_code = bill_code;
|
||||
}
|
||||
|
||||
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 getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getBillstatus() {
|
||||
return billstatus;
|
||||
}
|
||||
|
||||
public void setBillstatus(String billstatus) {
|
||||
this.billstatus = billstatus;
|
||||
}
|
||||
|
||||
public String getBillStatus() {
|
||||
return billStatus;
|
||||
}
|
||||
|
||||
public void setBillStatus(String billStatus) {
|
||||
this.billStatus = billStatus;
|
||||
}
|
||||
|
||||
public String getTargetDate() {
|
||||
return targetDate;
|
||||
}
|
||||
|
||||
public void setTargetDate(String targetDate) {
|
||||
this.targetDate = targetDate;
|
||||
}
|
||||
|
||||
public String getProject_code() {
|
||||
return project_code;
|
||||
}
|
||||
|
||||
public void setProject_code(String project_code) {
|
||||
this.project_code = project_code;
|
||||
}
|
||||
|
||||
public String getOne_project_type() {
|
||||
return one_project_type;
|
||||
}
|
||||
|
||||
public void setOne_project_type(String one_project_type) {
|
||||
this.one_project_type = one_project_type;
|
||||
}
|
||||
|
||||
public String getExamine_status() {
|
||||
return examine_status;
|
||||
}
|
||||
|
||||
public void setExamine_status(String examine_status) {
|
||||
this.examine_status = examine_status;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -371,6 +371,17 @@ public class AePushVoucherLogServiceImpl extends BaseService<AePushVoucherLogEnt
|
|||
mdmDBQueryVO.setBillstatus(vo.getBillStatus());
|
||||
PageHelper.startPage(mdmDBQueryVO.getPageNum(), mdmDBQueryVO.getPageSize());
|
||||
List<Map<String, Object>> maps = mdmDBQueryVODAO.queryDataByMdmId(mdmDBQueryVO);
|
||||
// for (Map<String, Object> map : maps) {
|
||||
// String billstatus = map.get("billStatus").toString();
|
||||
// if("N".equals(billstatus)){
|
||||
// map.put("billStatus",null);
|
||||
// map.put("billstatus",null);
|
||||
// }
|
||||
// if("Y".equals(billstatus)){
|
||||
// map.put("billStatus","Y");
|
||||
// map.put("billstatus","Y");
|
||||
// }
|
||||
// }
|
||||
PageInfo pageInfo = new PageInfo(maps);
|
||||
return pageInfo;
|
||||
|
||||
|
|
Loading…
Reference in New Issue