添加id转name注解方法
This commit is contained in:
@ -0,0 +1,6 @@
|
||||
package org.dromara.common.core.service;
|
||||
|
||||
public interface XzdCsContractInformationService {
|
||||
|
||||
String selectNameByIds(String ids);
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
package org.dromara.common.core.service;
|
||||
|
||||
public interface XzdJsCgJungonService {
|
||||
|
||||
String selectNameByIds(String ids);
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
package org.dromara.common.core.service;
|
||||
|
||||
public interface XzdSupplierOpenBankService {
|
||||
|
||||
String selectNameByIds(String ids);
|
||||
}
|
||||
@ -57,4 +57,16 @@ public interface TransConstant {
|
||||
* 采购合同id转名称
|
||||
*/
|
||||
String XZD_PURCHASE_CONTRACT_ID_TO_NAME = "xzd_purchase_contract_id_to_name";
|
||||
/**
|
||||
* 综合服务合同id转名称
|
||||
*/
|
||||
String XZD_CS_CONTRACT_INFORMATION_ID_TO_NAME = "xzd_cs_contract_information_id_to_name";
|
||||
/**
|
||||
* 结算-采购合同竣工结算id转名称
|
||||
*/
|
||||
String XZD_JS_CG_JUNGON_ID_TO_NAME = "xzd_js_cg_jungon_id_to_name";
|
||||
/**
|
||||
* 新中大供应商信息-开户银行id转银行名称
|
||||
*/
|
||||
String XZD_SUPPLIER_OPEN_BANK_ID_TO_NAME = "xzd_supplier_open_bank_id_to_name";
|
||||
}
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
package org.dromara.common.translation.core.impl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.dromara.common.core.service.XzdCsContractInformationService;
|
||||
import org.dromara.common.core.service.XzdPurchaseContractInformationService;
|
||||
import org.dromara.common.translation.annotation.TranslationType;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.common.translation.core.TranslationInterface;
|
||||
|
||||
@AllArgsConstructor
|
||||
@TranslationType(type = TransConstant.XZD_CS_CONTRACT_INFORMATION_ID_TO_NAME)
|
||||
public class XzdCsContractInformationImpl implements TranslationInterface<String> {
|
||||
|
||||
private final XzdCsContractInformationService xzdCsContractInformationService;
|
||||
|
||||
|
||||
@Override
|
||||
public String translation(Object key, String other) {
|
||||
if (key instanceof String ids) {
|
||||
return xzdCsContractInformationService.selectNameByIds(ids);
|
||||
} else if (key instanceof Long id) {
|
||||
return xzdCsContractInformationService.selectNameByIds(id.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package org.dromara.common.translation.core.impl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.dromara.common.core.service.XzdJsCgJungonService;
|
||||
import org.dromara.common.translation.annotation.TranslationType;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.common.translation.core.TranslationInterface;
|
||||
|
||||
@AllArgsConstructor
|
||||
@TranslationType(type = TransConstant.XZD_JS_CG_JUNGON_ID_TO_NAME)
|
||||
public class XzdJsCgJungonImpl implements TranslationInterface<String> {
|
||||
|
||||
private final XzdJsCgJungonService xzdJsCgJungonService;
|
||||
@Override
|
||||
public String translation(Object key, String other) {
|
||||
if (key instanceof String ids) {
|
||||
return xzdJsCgJungonService.selectNameByIds(ids);
|
||||
} else if (key instanceof Long id) {
|
||||
return xzdJsCgJungonService.selectNameByIds(id.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -11,7 +11,7 @@ import org.dromara.common.translation.core.TranslationInterface;
|
||||
@TranslationType(type = TransConstant.XZD_PURCHASE_CONTRACT_ID_TO_NAME)
|
||||
public class XzdPurchaseContractInformationImpl implements TranslationInterface<String> {
|
||||
|
||||
private XzdPurchaseContractInformationService xzdCustomerinformationService;
|
||||
private final XzdPurchaseContractInformationService xzdCustomerinformationService;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
package org.dromara.common.translation.core.impl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.dromara.common.core.service.XzdSupplierOpenBankService;
|
||||
import org.dromara.common.translation.annotation.TranslationType;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.common.translation.core.TranslationInterface;
|
||||
|
||||
@AllArgsConstructor
|
||||
@TranslationType(type = TransConstant.XZD_SUPPLIER_OPEN_BANK_ID_TO_NAME)
|
||||
public class XzdSupplierOpenBankImpl implements TranslationInterface<String> {
|
||||
|
||||
private final XzdSupplierOpenBankService xzdSupplierOpenBankService;
|
||||
@Override
|
||||
public String translation(Object key, String other) {
|
||||
if (key instanceof String ids) {
|
||||
return xzdSupplierOpenBankService.selectNameByIds(ids);
|
||||
} else if (key instanceof Long id) {
|
||||
return xzdSupplierOpenBankService.selectNameByIds(id.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -9,3 +9,6 @@ org.dromara.common.translation.core.impl.XzdCustomerinformationImpl
|
||||
org.dromara.common.translation.core.impl.XzdProjectImpl
|
||||
org.dromara.common.translation.core.impl.XzdPurchaseContractInformationImpl
|
||||
org.dromara.common.translation.core.impl.XzdSupplierInfoImpl
|
||||
org.dromara.common.translation.core.impl.XzdJsCgJungonImpl
|
||||
org.dromara.common.translation.core.impl.XzdCsContractInformationImpl
|
||||
org.dromara.common.translation.core.impl.XzdSupplierOpenBankImpl
|
||||
|
||||
@ -4,6 +4,8 @@ import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractChange;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
@ -91,6 +93,7 @@ public class XzdCsContractChangeVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "项目")
|
||||
private Long project;
|
||||
@Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
@ -104,6 +107,7 @@ public class XzdCsContractChangeVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "组织")
|
||||
private Long organization;
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "organization")
|
||||
private String organizationName;
|
||||
|
||||
/**
|
||||
@ -111,6 +115,7 @@ public class XzdCsContractChangeVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位")
|
||||
private Long partyA;
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "partyA")
|
||||
private String partyAName;
|
||||
|
||||
/**
|
||||
@ -118,6 +123,7 @@ public class XzdCsContractChangeVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位")
|
||||
private Long partyB;
|
||||
@Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "partyB")
|
||||
private String partyBName;
|
||||
|
||||
/**
|
||||
@ -174,6 +180,7 @@ public class XzdCsContractChangeVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "变更后项目经理")
|
||||
private Long afterChangeProjectManager;
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "afterChangeProjectManager")
|
||||
private String afterChangeProjectManagerName;
|
||||
|
||||
/**
|
||||
@ -181,6 +188,7 @@ public class XzdCsContractChangeVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "变更后项目责任人")
|
||||
private Long afterChangeProjectLeader;
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "afterChangeProjectLeader")
|
||||
private String afterChangeProjectLeaderName;
|
||||
|
||||
/**
|
||||
@ -188,6 +196,7 @@ public class XzdCsContractChangeVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "变更后现场经理")
|
||||
private Long afterChangeSiteManager;
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "afterChangeSiteManager")
|
||||
private String afterChangeSiteManagerName;
|
||||
|
||||
/**
|
||||
|
||||
@ -73,6 +73,7 @@ public class XzdCsContractInformationVo implements Serializable {
|
||||
@ExcelProperty(value = "项目ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "关=联项目表")
|
||||
private Long projectId;
|
||||
@Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "projectId")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
@ -150,6 +151,7 @@ public class XzdCsContractInformationVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "开票单位")
|
||||
private Long invoiceIssuer;
|
||||
@Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "invoiceIssuer")
|
||||
private String invoiceIssuerName;
|
||||
|
||||
/**
|
||||
@ -157,6 +159,7 @@ public class XzdCsContractInformationVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "收票单位")
|
||||
private Long invoiceReceiver;
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "invoiceReceiver")
|
||||
private String invoiceReceiverName;
|
||||
|
||||
/**
|
||||
@ -207,6 +210,7 @@ public class XzdCsContractInformationVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "签约组织")
|
||||
private Long signOrganization;
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "signOrganization")
|
||||
private String signOrganizationName;
|
||||
|
||||
/**
|
||||
@ -226,6 +230,7 @@ public class XzdCsContractInformationVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "项目责任人")
|
||||
private Long projectOwner;
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "projectOwner")
|
||||
private String projectOwnerName;
|
||||
|
||||
/**
|
||||
|
||||
@ -4,6 +4,8 @@ import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspend;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
@ -80,6 +82,7 @@ public class XzdCsContractSuspendVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "工程项目")
|
||||
private Long project;
|
||||
@Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
@ -87,6 +90,7 @@ public class XzdCsContractSuspendVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位")
|
||||
private Long artyBUnit;
|
||||
@Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "artyBUnit")
|
||||
private String artyBUnitName;
|
||||
|
||||
/**
|
||||
@ -94,6 +98,7 @@ public class XzdCsContractSuspendVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位")
|
||||
private Long partyAUnit;
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "partyAUnit")
|
||||
private String partyAUnitNamme;
|
||||
|
||||
/**
|
||||
|
||||
@ -62,18 +62,6 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractCha
|
||||
private IXzdCsContractSuspendZfkxService contractSuspendZfkxService;
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private ISysDeptService sysDeptService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private XzdProjectServiceImpl xzdProjectService;
|
||||
@Autowired
|
||||
private IXzdCorrespondentList iXzdCorrespondentList;
|
||||
@Autowired
|
||||
private XzdSupplierInfoServiceImpl xzdSupplierInfoService;
|
||||
|
||||
@Autowired
|
||||
private IXzdHtglHtbgqdService xzdHtglHtbgqdService;
|
||||
@ -89,7 +77,6 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractCha
|
||||
public XzdCsContractChangeVo queryById(Long id){
|
||||
XzdCsContractChangeVo xzdCsContractChangeVo = baseMapper.selectVoById(id);
|
||||
if (xzdCsContractChangeVo!=null){
|
||||
getName(xzdCsContractChangeVo);
|
||||
getHttk(xzdCsContractChangeVo);
|
||||
}
|
||||
return xzdCsContractChangeVo;
|
||||
@ -106,7 +93,6 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractCha
|
||||
public TableDataInfo<XzdCsContractChangeVo> queryPageList(XzdCsContractChangeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdCsContractChange> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdCsContractChangeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(this::getName);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@ -338,49 +324,6 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractCha
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取部分字段名称
|
||||
* @param item
|
||||
*/
|
||||
private void getName(XzdCsContractChangeVo item) {
|
||||
//项目名称
|
||||
if (item.getProject() != null){
|
||||
String projectName = xzdProjectService.queryNameById(item.getProject());
|
||||
if (projectName != null){
|
||||
item.setProjectName(projectName);
|
||||
}
|
||||
}
|
||||
//签约组织(客户信息列表)
|
||||
String dtoR = sysDeptService.selectDeptNameById(item.getOrganization());
|
||||
if (dtoR!=null){
|
||||
item.setOrganizationName(dtoR);
|
||||
}
|
||||
|
||||
//甲方单位(客户信息列表)
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getPartyA());
|
||||
if (byid!=null){
|
||||
item.setPartyAName(byid);
|
||||
}
|
||||
//乙方单位(供应商信息列表)
|
||||
String xzdSupplierInfoVo = xzdSupplierInfoService.queryNameById(item.getPartyB());
|
||||
if (xzdSupplierInfoVo != null){
|
||||
item.setPartyBName(xzdSupplierInfoVo);
|
||||
}
|
||||
String name1 = sysUserService.queryNameById(item.getAfterChangeSiteManager());
|
||||
if (name1 != null){
|
||||
item.setAfterChangeSiteManagerName(name1);
|
||||
}
|
||||
String name2 = sysUserService.queryNameById(item.getAfterChangeProjectLeader());
|
||||
if (name2 != null){
|
||||
item.setAfterChangeProjectLeaderName(name2);
|
||||
}
|
||||
String name3 = sysUserService.queryNameById(item.getAfterChangeProjectManager());
|
||||
if (name3 != null){
|
||||
item.setAfterChangeProjectManagerName(name3);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取合同条款内容
|
||||
* @param vo
|
||||
|
||||
@ -1,11 +1,15 @@
|
||||
package org.dromara.xzd.comprehensive.service.impl;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.service.XzdCsContractInformationService;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.SpringUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -33,6 +37,7 @@ import org.dromara.xzd.domain.vo.XzdSupplierInfoVo;
|
||||
import org.dromara.xzd.enums.XzdClassEnum;
|
||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||
import org.dromara.xzd.service.impl.*;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractInformationBo;
|
||||
@ -52,7 +57,7 @@ import java.util.*;
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContractInformationMapper, XzdCsContractInformation> implements IXzdCsContractInformationService {
|
||||
public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContractInformationMapper, XzdCsContractInformation> implements IXzdCsContractInformationService, XzdCsContractInformationService {
|
||||
|
||||
private final XzdCsContractInformationMapper baseMapper;
|
||||
|
||||
@ -65,21 +70,9 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private SysDeptServiceImpl sysDeptService;
|
||||
@Autowired
|
||||
private XzdProjectServiceImpl xzdProjectService;
|
||||
@Autowired
|
||||
private IXzdCorrespondentList iXzdCorrespondentList;
|
||||
@Autowired
|
||||
private XzdSupplierInfoServiceImpl xzdSupplierInfoService;
|
||||
|
||||
@Autowired
|
||||
private IXzdHtglHtbgqdService xzdHtglHtbgqdService;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 查询综合服务合同信息
|
||||
@ -91,7 +84,6 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
|
||||
public XzdCsContractInformationVo queryById(Long id){
|
||||
XzdCsContractInformationVo vo = baseMapper.selectVoById(id);
|
||||
if (vo!=null){
|
||||
getName(vo);
|
||||
getHttk(vo);
|
||||
}
|
||||
return vo;
|
||||
@ -135,77 +127,9 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
|
||||
public TableDataInfo<XzdCsContractInformationVo> queryPageList(XzdCsContractInformationBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdCsContractInformation> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdCsContractInformationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
for (XzdCsContractInformationVo item : result.getRecords()) {
|
||||
getName(item);
|
||||
}
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部分字段名称
|
||||
* @param item
|
||||
*/
|
||||
private void getName(XzdCsContractInformationVo item) {
|
||||
//部门名称
|
||||
if (item.getDepartmentId() != null){
|
||||
String deptName = sysDeptService.selectDeptNameById(item.getDepartmentId());
|
||||
if (deptName != null){
|
||||
item.setDepartmentName(deptName);
|
||||
}
|
||||
}
|
||||
//项目名称
|
||||
if (item.getProjectId() != null){
|
||||
String projectName = xzdProjectService.queryNameById(item.getProjectId());
|
||||
if (projectName != null){
|
||||
item.setProjectName(projectName);
|
||||
}
|
||||
}
|
||||
//签约组织(客户信息列表)
|
||||
|
||||
if (item.getSignOrganization() != null){
|
||||
String byid = sysDeptService.selectDeptNameById(item.getSignOrganization());
|
||||
if (byid!=null){
|
||||
item.setSignOrganizationName(byid);
|
||||
}
|
||||
}
|
||||
//甲方单位(客户信息列表)
|
||||
if (item.getPartyA() != null){
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getPartyA());
|
||||
if (byid!=null){
|
||||
item.setPartyAName(byid);
|
||||
}
|
||||
}
|
||||
//乙方单位(供应商信息列表)
|
||||
if (item.getPartyB() != null){
|
||||
String unitName = xzdSupplierInfoService.queryNameById(item.getPartyB());
|
||||
if (unitName != null){
|
||||
|
||||
item.setPartyBName(unitName);
|
||||
}
|
||||
}
|
||||
//开票单位名称(供应商名称)
|
||||
if (item.getInvoiceIssuer() != null){
|
||||
String unitName = xzdSupplierInfoService.queryNameById(item.getInvoiceIssuer());
|
||||
if (unitName != null){
|
||||
item.setInvoiceIssuerName(unitName);
|
||||
}
|
||||
}
|
||||
//收票单位名称(客户名称)
|
||||
if (item.getInvoiceReceiver()!= null){
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getInvoiceReceiver());
|
||||
if (byid!=null){
|
||||
item.setInvoiceReceiverName(byid);
|
||||
}
|
||||
}
|
||||
//项目负责人
|
||||
if (item.getProjectOwner() != null){
|
||||
String s = sysUserService.queryNameById(item.getProjectOwner());
|
||||
if (s!=null){
|
||||
item.setProjectOwnerName(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的综合服务合同信息列表
|
||||
*
|
||||
@ -446,4 +370,16 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
|
||||
XzdCsContractInformationVo vo = baseMapper.selectVoById(contractCode);
|
||||
return vo!=null ?vo.getContractCode():"";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String selectNameByIds(String ids) {
|
||||
List<String> list = new ArrayList<>();
|
||||
for (Long id : StringUtils.splitTo(ids, Convert::toLong)) {
|
||||
XzdCsContractInformationVo vo = SpringUtils.getAopProxy(this).getBaseMapper().selectVoById(id);
|
||||
if (ObjectUtil.isNotNull(vo)) {
|
||||
list.add(vo.getContractCode());
|
||||
}
|
||||
}
|
||||
return String.join(StringUtils.SEPARATOR, list);
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,15 +45,6 @@ public class XzdCsContractSuspendServiceImpl extends ServiceImpl<XzdCsContractSu
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private XzdProjectServiceImpl xzdProjectService;
|
||||
@Autowired
|
||||
private IXzdCorrespondentList iXzdCorrespondentList;
|
||||
@Autowired
|
||||
private XzdSupplierInfoServiceImpl xzdSupplierInfoService;
|
||||
|
||||
/**
|
||||
* 查询综合服务合同终止
|
||||
*
|
||||
@ -62,11 +53,7 @@ public class XzdCsContractSuspendServiceImpl extends ServiceImpl<XzdCsContractSu
|
||||
*/
|
||||
@Override
|
||||
public XzdCsContractSuspendVo queryById(Long id){
|
||||
XzdCsContractSuspendVo vo = baseMapper.selectVoById(id);
|
||||
if (vo!=null){
|
||||
getName(vo);
|
||||
}
|
||||
return vo;
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -80,7 +67,6 @@ public class XzdCsContractSuspendServiceImpl extends ServiceImpl<XzdCsContractSu
|
||||
public TableDataInfo<XzdCsContractSuspendVo> queryPageList(XzdCsContractSuspendBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdCsContractSuspend> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdCsContractSuspendVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(this::getName);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@ -186,28 +172,4 @@ public class XzdCsContractSuspendServiceImpl extends ServiceImpl<XzdCsContractSu
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部分字段名称
|
||||
* @param item
|
||||
*/
|
||||
private void getName(XzdCsContractSuspendVo item) {
|
||||
//项目名称
|
||||
if (item.getProject() != null){
|
||||
String projectName = xzdProjectService.queryNameById(item.getProject());
|
||||
if (projectName != null){
|
||||
item.setProjectName(projectName);
|
||||
}
|
||||
}
|
||||
//甲方单位(客户信息列表)
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getPartyAUnit());
|
||||
if (byid!=null){
|
||||
item.setPartyAUnitNamme(byid);
|
||||
}
|
||||
//乙方单位(供应商信息列表)
|
||||
String xzdSupplierInfoVo = xzdSupplierInfoService.queryNameById(item.getArtyBUnit());
|
||||
if (xzdSupplierInfoVo != null){
|
||||
item.setArtyBUnitName(xzdSupplierInfoVo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,6 +28,10 @@ public class XzdSfkCaigouFk extends BaseEntity {
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 单据编码(带*,必填)
|
||||
|
||||
@ -29,6 +29,11 @@ public class XzdSfkZonhefuwuFk extends BaseEntity {
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 单据编码(带*,必填)
|
||||
*/
|
||||
|
||||
@ -32,6 +32,11 @@ public class XzdSfkCaigouFkBo extends BaseEntity {
|
||||
@NotNull(message = "主键ID,自增不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 单据编码(带*,必填)
|
||||
*/
|
||||
|
||||
@ -31,6 +31,11 @@ public class XzdSfkZonhefuwuFkBo extends BaseEntity {
|
||||
@NotNull(message = "主键ID,自增不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 单据编码(带*,必填)
|
||||
*/
|
||||
|
||||
@ -3,6 +3,8 @@ package org.dromara.xzd.paymentsReceipts.domain.vo;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.xzd.paymentsReceipts.domain.XzdSfkCaigouFk;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
@ -40,6 +42,11 @@ public class XzdSfkCaigouFkVo extends BaseEntity {
|
||||
@ExcelProperty(value = "主键ID,自增")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 单据编码(带*,必填)
|
||||
*/
|
||||
@ -67,6 +74,7 @@ public class XzdSfkCaigouFkVo extends BaseEntity {
|
||||
@ExcelProperty(value = "合同编码", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private Long contractCode;
|
||||
@Translation(type = TransConstant.XZD_PURCHASE_CONTRACT_ID_TO_NAME, mapper = "contractCode")
|
||||
private String contractCodeName;
|
||||
|
||||
/**
|
||||
@ -99,6 +107,7 @@ public class XzdSfkCaigouFkVo extends BaseEntity {
|
||||
*/
|
||||
@ExcelProperty(value = "项目")
|
||||
private Long project;
|
||||
@Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
@ -106,6 +115,7 @@ public class XzdSfkCaigouFkVo extends BaseEntity {
|
||||
*/
|
||||
@ExcelProperty(value = "付款单位")
|
||||
private Long paymentUnit;
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "paymentUnit")
|
||||
private String paymentUnitName;
|
||||
|
||||
/**
|
||||
@ -114,6 +124,7 @@ public class XzdSfkCaigouFkVo extends BaseEntity {
|
||||
@ExcelProperty(value = "收款单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private Long receiptUnit;
|
||||
@Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "receiptUnit")
|
||||
private String receiptUnitName;
|
||||
|
||||
/**
|
||||
@ -121,6 +132,7 @@ public class XzdSfkCaigouFkVo extends BaseEntity {
|
||||
*/
|
||||
@ExcelProperty(value = "收款银行")
|
||||
private Long receiptBank;
|
||||
@Translation(type = TransConstant.XZD_SUPPLIER_OPEN_BANK_ID_TO_NAME, mapper = "receiptBank")
|
||||
private String receiptBankName;
|
||||
|
||||
/**
|
||||
|
||||
@ -3,6 +3,8 @@ package org.dromara.xzd.paymentsReceipts.domain.vo;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFapiao;
|
||||
import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFukuan;
|
||||
import org.dromara.xzd.paymentsReceipts.domain.XzdSfkZonhefuwuFk;
|
||||
@ -40,6 +42,11 @@ public class XzdSfkZonhefuwuFkVo extends BaseEntity {
|
||||
@ExcelProperty(value = "主键ID,自增")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 单据编码(带*,必填)
|
||||
*/
|
||||
@ -67,6 +74,7 @@ public class XzdSfkZonhefuwuFkVo extends BaseEntity {
|
||||
@ExcelProperty(value = "合同编码", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private Long contractCode;
|
||||
@Translation(type = TransConstant.XZD_CS_CONTRACT_INFORMATION_ID_TO_NAME, mapper = "contractCode")
|
||||
private String contractCodeName;
|
||||
|
||||
/**
|
||||
@ -99,6 +107,7 @@ public class XzdSfkZonhefuwuFkVo extends BaseEntity {
|
||||
*/
|
||||
@ExcelProperty(value = "项目")
|
||||
private Long project;
|
||||
@Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
@ -106,6 +115,7 @@ public class XzdSfkZonhefuwuFkVo extends BaseEntity {
|
||||
*/
|
||||
@ExcelProperty(value = "付款单位")
|
||||
private Long paymentUnit;
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "paymentUnit")
|
||||
private String paymentUnitName;
|
||||
|
||||
/**
|
||||
@ -114,6 +124,7 @@ public class XzdSfkZonhefuwuFkVo extends BaseEntity {
|
||||
@ExcelProperty(value = "收款单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private Long receiptUnit;
|
||||
@Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "receiptUnit")
|
||||
private String receiptUnitName;
|
||||
|
||||
/**
|
||||
@ -121,6 +132,7 @@ public class XzdSfkZonhefuwuFkVo extends BaseEntity {
|
||||
*/
|
||||
@ExcelProperty(value = "收款银行")
|
||||
private Long receiptBank;
|
||||
@Translation(type = TransConstant.XZD_SUPPLIER_OPEN_BANK_ID_TO_NAME, mapper = "receiptBank")
|
||||
private String receiptBankName;
|
||||
|
||||
/**
|
||||
|
||||
@ -73,7 +73,6 @@ public class XzdSfkCaigouFkServiceImpl extends ServiceImpl<XzdSfkCaigouFkMapper,
|
||||
@Override
|
||||
public XzdSfkCaigouFkVo queryById(Long id){
|
||||
XzdSfkCaigouFkVo vo = baseMapper.selectVoById(id);
|
||||
getName(vo);
|
||||
getHttk(vo);
|
||||
return vo;
|
||||
}
|
||||
@ -89,7 +88,6 @@ public class XzdSfkCaigouFkServiceImpl extends ServiceImpl<XzdSfkCaigouFkMapper,
|
||||
public TableDataInfo<XzdSfkCaigouFkVo> queryPageList(XzdSfkCaigouFkBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdSfkCaigouFk> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdSfkCaigouFkVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(this::getName);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@ -102,9 +100,7 @@ public class XzdSfkCaigouFkServiceImpl extends ServiceImpl<XzdSfkCaigouFkMapper,
|
||||
@Override
|
||||
public List<XzdSfkCaigouFkVo> queryList(XzdSfkCaigouFkBo bo) {
|
||||
LambdaQueryWrapper<XzdSfkCaigouFk> lqw = buildQueryWrapper(bo);
|
||||
List<XzdSfkCaigouFkVo> vos = baseMapper.selectVoList(lqw);
|
||||
vos.forEach(this::getName);
|
||||
return vos;
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdSfkCaigouFk> buildQueryWrapper(XzdSfkCaigouFkBo bo) {
|
||||
@ -113,6 +109,7 @@ public class XzdSfkCaigouFkServiceImpl extends ServiceImpl<XzdSfkCaigouFkMapper,
|
||||
lqw.orderByDesc(XzdSfkCaigouFk::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocCode()), XzdSfkCaigouFk::getDocCode, bo.getDocCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getTitle()), XzdSfkCaigouFk::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getDeptId() != null, XzdSfkCaigouFk::getDeptId, bo.getDeptId());
|
||||
lqw.eq(bo.getDocDate() != null, XzdSfkCaigouFk::getDocDate, bo.getDocDate());
|
||||
lqw.eq(bo.getContractCode() != null, XzdSfkCaigouFk::getContractCode, bo.getContractCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdSfkCaigouFk::getContractName, bo.getContractName());
|
||||
@ -246,47 +243,6 @@ public class XzdSfkCaigouFkServiceImpl extends ServiceImpl<XzdSfkCaigouFkMapper,
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部分字段名称
|
||||
* @param item
|
||||
*/
|
||||
private void getName(XzdSfkCaigouFkVo item) {
|
||||
//项目名称
|
||||
if (item.getProject() != null){
|
||||
String projectName = xzdProjectService.queryNameById(item.getProject());
|
||||
if (projectName != null){
|
||||
item.setProjectName(projectName);
|
||||
}
|
||||
}
|
||||
//合同编码
|
||||
if (item.getContractCode() != null){
|
||||
String code = purchaseContractInformationService.queryCodeById(item.getContractCode());
|
||||
if (code != null){
|
||||
item.setContractCodeName(code);
|
||||
}
|
||||
}
|
||||
//收款单位(供应商名称)
|
||||
if (item.getReceiptUnit() != null){
|
||||
String unitName = xzdSupplierInfoService.queryNameById(item.getReceiptUnit());
|
||||
if (unitName != null){
|
||||
item.setReceiptUnitName(unitName);
|
||||
}
|
||||
}
|
||||
//付款单位(客户名称)
|
||||
if (item.getPaymentUnit()!= null){
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getPaymentUnit());
|
||||
if (byid!=null){
|
||||
item.setPaymentUnitName(byid);
|
||||
}
|
||||
}
|
||||
//收款银行
|
||||
if (item.getReceiptBank() != null){
|
||||
String bankName = supplierOpenBankService.queryNameById(item.getReceiptBank());
|
||||
if (bankName != null){
|
||||
item.setReceiptBankName(bankName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子项
|
||||
|
||||
@ -72,7 +72,6 @@ public class XzdSfkZonhefuwuFkServiceImpl extends ServiceImpl<XzdSfkZonhefuwuFkM
|
||||
@Override
|
||||
public XzdSfkZonhefuwuFkVo queryById(Long id){
|
||||
XzdSfkZonhefuwuFkVo vo = baseMapper.selectVoById(id);
|
||||
getName(vo);
|
||||
getHttk(vo);
|
||||
return vo;
|
||||
}
|
||||
@ -88,7 +87,6 @@ public class XzdSfkZonhefuwuFkServiceImpl extends ServiceImpl<XzdSfkZonhefuwuFkM
|
||||
public TableDataInfo<XzdSfkZonhefuwuFkVo> queryPageList(XzdSfkZonhefuwuFkBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdSfkZonhefuwuFk> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdSfkZonhefuwuFkVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(this::getName);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@ -101,9 +99,7 @@ public class XzdSfkZonhefuwuFkServiceImpl extends ServiceImpl<XzdSfkZonhefuwuFkM
|
||||
@Override
|
||||
public List<XzdSfkZonhefuwuFkVo> queryList(XzdSfkZonhefuwuFkBo bo) {
|
||||
LambdaQueryWrapper<XzdSfkZonhefuwuFk> lqw = buildQueryWrapper(bo);
|
||||
List<XzdSfkZonhefuwuFkVo> vos = baseMapper.selectVoList(lqw);
|
||||
vos.forEach(this::getName);
|
||||
return vos;
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdSfkZonhefuwuFk> buildQueryWrapper(XzdSfkZonhefuwuFkBo bo) {
|
||||
@ -112,6 +108,7 @@ public class XzdSfkZonhefuwuFkServiceImpl extends ServiceImpl<XzdSfkZonhefuwuFkM
|
||||
lqw.orderByDesc(XzdSfkZonhefuwuFk::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocCode()), XzdSfkZonhefuwuFk::getDocCode, bo.getDocCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getTitle()), XzdSfkZonhefuwuFk::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getDeptId() != null, XzdSfkZonhefuwuFk::getDeptId, bo.getDeptId());
|
||||
lqw.eq(bo.getDocDate() != null, XzdSfkZonhefuwuFk::getDocDate, bo.getDocDate());
|
||||
lqw.eq(bo.getContractCode() != null, XzdSfkZonhefuwuFk::getContractCode, bo.getContractCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdSfkZonhefuwuFk::getContractName, bo.getContractName());
|
||||
@ -244,48 +241,6 @@ public class XzdSfkZonhefuwuFkServiceImpl extends ServiceImpl<XzdSfkZonhefuwuFkM
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部分字段名称
|
||||
* @param item
|
||||
*/
|
||||
private void getName(XzdSfkZonhefuwuFkVo item) {
|
||||
//项目名称
|
||||
if (item.getProject() != null){
|
||||
String projectName = xzdProjectService.queryNameById(item.getProject());
|
||||
if (projectName != null){
|
||||
item.setProjectName(projectName);
|
||||
}
|
||||
}
|
||||
//合同编码
|
||||
if (item.getContractCode() != null){
|
||||
String code = csContractInformationService.queryCodeById(item.getContractCode());
|
||||
if (code != null){
|
||||
item.setContractCodeName(code);
|
||||
}
|
||||
}
|
||||
//收款单位(供应商名称)
|
||||
if (item.getReceiptUnit() != null){
|
||||
String unitName = xzdSupplierInfoService.queryNameById(item.getReceiptUnit());
|
||||
if (unitName != null){
|
||||
item.setReceiptUnitName(unitName);
|
||||
}
|
||||
}
|
||||
//付款单位(客户名称)
|
||||
if (item.getPaymentUnit()!= null){
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getPaymentUnit());
|
||||
if (byid!=null){
|
||||
item.setPaymentUnitName(byid);
|
||||
}
|
||||
}
|
||||
//收款银行
|
||||
if (item.getReceiptBank() != null){
|
||||
String bankName = supplierOpenBankService.queryNameById(item.getReceiptBank());
|
||||
if (bankName != null){
|
||||
item.setReceiptBankName(bankName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子项
|
||||
* @param vo
|
||||
|
||||
@ -1,8 +1,12 @@
|
||||
package org.dromara.xzd.service.impl;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.service.XzdSupplierOpenBankService;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.SpringUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -10,6 +14,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.domain.bo.XzdSupplierOpenBankBo;
|
||||
import org.dromara.xzd.domain.vo.XzdSupplierOpenBankVo;
|
||||
@ -17,6 +22,7 @@ import org.dromara.xzd.domain.XzdSupplierOpenBank;
|
||||
import org.dromara.xzd.mapper.XzdSupplierOpenBankMapper;
|
||||
import org.dromara.xzd.service.IXzdSupplierOpenBankService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
@ -29,7 +35,7 @@ import java.util.Collection;
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdSupplierOpenBankServiceImpl extends ServiceImpl<XzdSupplierOpenBankMapper, XzdSupplierOpenBank> implements IXzdSupplierOpenBankService {
|
||||
public class XzdSupplierOpenBankServiceImpl extends ServiceImpl<XzdSupplierOpenBankMapper, XzdSupplierOpenBank> implements IXzdSupplierOpenBankService, XzdSupplierOpenBankService {
|
||||
|
||||
private final XzdSupplierOpenBankMapper baseMapper;
|
||||
|
||||
@ -152,4 +158,16 @@ public class XzdSupplierOpenBankServiceImpl extends ServiceImpl<XzdSupplierOpenB
|
||||
public String queryNameById(Long id) {
|
||||
return baseMapper.selectVoById(id).getOpenBank();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String selectNameByIds(String ids) {
|
||||
List<String> list = new ArrayList<>();
|
||||
for (Long id : StringUtils.splitTo(ids, Convert::toLong)) {
|
||||
XzdSupplierOpenBankVo vo = SpringUtils.getAopProxy(this).getBaseMapper().selectVoById(id);
|
||||
if (ObjectUtil.isNotNull(vo)) {
|
||||
list.add(vo.getOpenBank());
|
||||
}
|
||||
}
|
||||
return String.join(StringUtils.SEPARATOR, list);
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,6 +68,10 @@ public class XzdJsCgJungonEdit extends BaseEntity {
|
||||
* 调整后决算金额(带*,必填)
|
||||
*/
|
||||
private BigDecimal adjustedFinalAmount;
|
||||
/**
|
||||
* 决算金额
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
/**
|
||||
* 工程项目(带*,必填)
|
||||
|
||||
@ -76,6 +76,11 @@ public class XzdJsCgJungonEditBo extends BaseEntity {
|
||||
@NotNull(message = "调整后决算金额(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal adjustedFinalAmount;
|
||||
|
||||
/**
|
||||
* 决算金额
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
/**
|
||||
* 工程项目(带*,必填)
|
||||
*/
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
package org.dromara.xzd.settlement.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJungonEdit;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
@ -68,8 +71,8 @@ public class XzdJsCgJungonEditVo implements Serializable {
|
||||
* 决算单号(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "决算单号", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private Long finalAccountCode;
|
||||
@Translation(type = TransConstant.XZD_JS_CG_JUNGON_ID_TO_NAME, mapper = "finalAccountCode")
|
||||
private String finalAccountCodeName;
|
||||
|
||||
|
||||
@ -84,6 +87,7 @@ public class XzdJsCgJungonEditVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "合同编号")
|
||||
private Long contractCode;
|
||||
@Translation(type = TransConstant.XZD_PURCHASE_CONTRACT_ID_TO_NAME, mapper = "contractCode")
|
||||
private String contractCodeName;
|
||||
|
||||
|
||||
@ -94,12 +98,18 @@ public class XzdJsCgJungonEditVo implements Serializable {
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private BigDecimal adjustedFinalAmount;
|
||||
|
||||
/**
|
||||
* 决算金额
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
/**
|
||||
* 工程项目(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "工程项目", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private Long projectId;
|
||||
@Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "projectId")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
@ -107,6 +117,7 @@ public class XzdJsCgJungonEditVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "默认财务组织")
|
||||
private Long defaultFinanceOrg;
|
||||
@Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "defaultFinanceOrg")
|
||||
private String defaultFinanceOrgName;
|
||||
|
||||
/**
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
package org.dromara.xzd.settlement.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJungon;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
@ -70,6 +73,7 @@ public class XzdJsCgJungonVo implements Serializable {
|
||||
@ExcelProperty(value = "合同编号", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,关联合同表")
|
||||
private Long contractCode;
|
||||
@Translation(type = TransConstant.XZD_PURCHASE_CONTRACT_ID_TO_NAME, mapper = "contractCode")
|
||||
private String contractCodeName;
|
||||
|
||||
/**
|
||||
@ -115,6 +119,7 @@ public class XzdJsCgJungonVo implements Serializable {
|
||||
@ExcelProperty(value = "工程项目", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,关联项目表")
|
||||
private Long projectId;
|
||||
@Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "projectId")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
@ -129,6 +134,7 @@ public class XzdJsCgJungonVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位")
|
||||
private Long partyA;
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "partyA")
|
||||
private String partyAName;
|
||||
|
||||
/**
|
||||
@ -136,6 +142,7 @@ public class XzdJsCgJungonVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位")
|
||||
private Long partyB;
|
||||
@Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "partyB")
|
||||
private String partyBName;
|
||||
|
||||
/**
|
||||
@ -156,6 +163,7 @@ public class XzdJsCgJungonVo implements Serializable {
|
||||
@ExcelProperty(value = "业主单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=查询,关联单位表")
|
||||
private Long ownerUnit;
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "ownerUnit")
|
||||
private String ownerUnitName;
|
||||
|
||||
/**
|
||||
@ -164,6 +172,7 @@ public class XzdJsCgJungonVo implements Serializable {
|
||||
@ExcelProperty(value = "监理单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=查询,关联单位表")
|
||||
private Long supervisionUnit;
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "supervisionUnit")
|
||||
private String supervisionUnitName;
|
||||
|
||||
/**
|
||||
@ -172,6 +181,7 @@ public class XzdJsCgJungonVo implements Serializable {
|
||||
@ExcelProperty(value = "施工单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=查询,关联单位表")
|
||||
private Long constructionUnit;
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "constructionUnit")
|
||||
private String constructionUnitName;
|
||||
|
||||
/**
|
||||
@ -180,6 +190,7 @@ public class XzdJsCgJungonVo implements Serializable {
|
||||
@ExcelProperty(value = "审核单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=查询,关联单位表")
|
||||
private Long auditUnit;
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "auditUnit")
|
||||
private String auditUnitName;
|
||||
|
||||
/**
|
||||
|
||||
@ -2,6 +2,8 @@ package org.dromara.xzd.settlement.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.xzd.settlement.domain.XzdAlterationInventory;
|
||||
import org.dromara.xzd.settlement.domain.XzdContractInventory;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsDeductionItems;
|
||||
@ -71,6 +73,7 @@ public class XzdJsZhfwJinduVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "合同编码")
|
||||
private Long contractCode;
|
||||
@Translation(type = TransConstant.XZD_CS_CONTRACT_INFORMATION_ID_TO_NAME, mapper = "contractCode")
|
||||
private String contractCodeCode;
|
||||
|
||||
/**
|
||||
@ -108,6 +111,7 @@ public class XzdJsZhfwJinduVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "项目")
|
||||
private Long project;
|
||||
@Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
@ -115,6 +119,7 @@ public class XzdJsZhfwJinduVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "结算单位")
|
||||
private Long settlementUnit;
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "settlementUnit")
|
||||
private String settlementUnitName;
|
||||
|
||||
/**
|
||||
|
||||
@ -44,26 +44,12 @@ public class XzdJsCgJungonEditServiceImpl extends ServiceImpl<XzdJsCgJungonEditM
|
||||
|
||||
private final XzdJsCgJungonEditMapper baseMapper;
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private IXzdPurchaseContractInformationService xzdPurchaseContractInformationService;
|
||||
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
|
||||
@Autowired
|
||||
private SysDeptServiceImpl sysDeptService;
|
||||
|
||||
@Autowired
|
||||
private XzdProjectServiceImpl xzdProjectService;
|
||||
|
||||
@Autowired
|
||||
private IXzdJsDeductionItemsService deductionItemsService;
|
||||
|
||||
@Autowired
|
||||
private IXzdJsCgJungonService jungonService;
|
||||
|
||||
@Autowired
|
||||
private IXzdJsCghtJstzqdService jsCghtJstzqdService;
|
||||
|
||||
@ -76,7 +62,6 @@ public class XzdJsCgJungonEditServiceImpl extends ServiceImpl<XzdJsCgJungonEditM
|
||||
@Override
|
||||
public XzdJsCgJungonEditVo queryById(Long id){
|
||||
XzdJsCgJungonEditVo vo = baseMapper.selectVoById(id);
|
||||
getName(vo);
|
||||
getHttk(vo);
|
||||
return vo;
|
||||
}
|
||||
@ -92,7 +77,6 @@ public class XzdJsCgJungonEditServiceImpl extends ServiceImpl<XzdJsCgJungonEditM
|
||||
public TableDataInfo<XzdJsCgJungonEditVo> queryPageList(XzdJsCgJungonEditBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdJsCgJungonEdit> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdJsCgJungonEditVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(this::getName);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@ -105,9 +89,7 @@ public class XzdJsCgJungonEditServiceImpl extends ServiceImpl<XzdJsCgJungonEditM
|
||||
@Override
|
||||
public List<XzdJsCgJungonEditVo> queryList(XzdJsCgJungonEditBo bo) {
|
||||
LambdaQueryWrapper<XzdJsCgJungonEdit> lqw = buildQueryWrapper(bo);
|
||||
List<XzdJsCgJungonEditVo> vos = baseMapper.selectVoList(lqw);
|
||||
vos.forEach(this::getName);
|
||||
return vos;
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdJsCgJungonEdit> buildQueryWrapper(XzdJsCgJungonEditBo bo) {
|
||||
@ -238,41 +220,6 @@ public class XzdJsCgJungonEditServiceImpl extends ServiceImpl<XzdJsCgJungonEditM
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部分字段名称
|
||||
* @param item
|
||||
*/
|
||||
private void getName(XzdJsCgJungonEditVo item) {
|
||||
//项目名称
|
||||
if (item.getProjectId() != null){
|
||||
String projectName = xzdProjectService.queryNameById(item.getProjectId());
|
||||
if (projectName != null){
|
||||
item.setProjectName(projectName);
|
||||
}
|
||||
}
|
||||
//决算单据名称
|
||||
if (item.getFinalAccountCode() != null){
|
||||
String codeName = jungonService.queryNameById(item.getFinalAccountCode());
|
||||
if (codeName != null){
|
||||
item.setFinalAccountCodeName(codeName);
|
||||
}
|
||||
}
|
||||
//合同编码
|
||||
if (item.getContractCode() != null){
|
||||
String code = xzdPurchaseContractInformationService.queryCodeById(item.getContractCode());
|
||||
if (code != null){
|
||||
item.setContractCodeName(code);
|
||||
}
|
||||
}
|
||||
//部门名称
|
||||
if (item.getDefaultFinanceOrg() != null){
|
||||
String deptName = sysDeptService.selectDeptNameById(item.getDefaultFinanceOrg());
|
||||
if (deptName != null){
|
||||
item.setDefaultFinanceOrgName(deptName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取扣款与奖励项
|
||||
* @param vo
|
||||
|
||||
@ -1,8 +1,12 @@
|
||||
package org.dromara.xzd.settlement.service.impl;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.service.XzdJsCgJungonService;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.SpringUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -13,6 +17,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.utils.BatchNumberGenerator;
|
||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||
import org.dromara.xzd.contractManagement.purchaseManagement.service.IXzdPurchaseContractInformationService;
|
||||
import org.dromara.xzd.domain.vo.XzdProjectVo;
|
||||
import org.dromara.xzd.enums.XzdClassEnum;
|
||||
import org.dromara.xzd.enums.ZxdEnum;
|
||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||
@ -42,7 +47,7 @@ import java.util.*;
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdJsCgJungonServiceImpl extends ServiceImpl<XzdJsCgJungonMapper, XzdJsCgJungon> implements IXzdJsCgJungonService {
|
||||
public class XzdJsCgJungonServiceImpl extends ServiceImpl<XzdJsCgJungonMapper, XzdJsCgJungon> implements IXzdJsCgJungonService, XzdJsCgJungonService {
|
||||
|
||||
private final XzdJsCgJungonMapper baseMapper;
|
||||
|
||||
@ -75,7 +80,7 @@ public class XzdJsCgJungonServiceImpl extends ServiceImpl<XzdJsCgJungonMapper, X
|
||||
@Override
|
||||
public XzdJsCgJungonVo queryById(Long id){
|
||||
XzdJsCgJungonVo vo = baseMapper.selectVoById(id);
|
||||
getName(vo);
|
||||
|
||||
getHttk(vo);
|
||||
return vo;
|
||||
}
|
||||
@ -91,7 +96,6 @@ public class XzdJsCgJungonServiceImpl extends ServiceImpl<XzdJsCgJungonMapper, X
|
||||
public TableDataInfo<XzdJsCgJungonVo> queryPageList(XzdJsCgJungonBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdJsCgJungon> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdJsCgJungonVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(this::getName);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@ -104,9 +108,7 @@ public class XzdJsCgJungonServiceImpl extends ServiceImpl<XzdJsCgJungonMapper, X
|
||||
@Override
|
||||
public List<XzdJsCgJungonVo> queryList(XzdJsCgJungonBo bo) {
|
||||
LambdaQueryWrapper<XzdJsCgJungon> lqw = buildQueryWrapper(bo);
|
||||
List<XzdJsCgJungonVo> vos = baseMapper.selectVoList(lqw);
|
||||
vos.forEach(this::getName);
|
||||
return vos;
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdJsCgJungon> buildQueryWrapper(XzdJsCgJungonBo bo) {
|
||||
@ -254,69 +256,6 @@ public class XzdJsCgJungonServiceImpl extends ServiceImpl<XzdJsCgJungonMapper, X
|
||||
return vo!= null? vo.getDocCode():"";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部分字段名称
|
||||
* @param item
|
||||
*/
|
||||
private void getName(XzdJsCgJungonVo item) {
|
||||
//项目名称
|
||||
if (item.getProjectId() != null){
|
||||
String projectName = xzdProjectService.queryNameById(item.getProjectId());
|
||||
if (projectName != null){
|
||||
item.setProjectName(projectName);
|
||||
}
|
||||
}
|
||||
if (item.getContractCode() != null){
|
||||
String code = xzdPurchaseContractInformationService.queryCodeById(item.getContractCode());
|
||||
if (code != null){
|
||||
item.setContractCodeName(code);
|
||||
}
|
||||
}
|
||||
//甲方单位(客户信息列表)
|
||||
if (item.getPartyA() != null){
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getPartyA());
|
||||
if (byid!=null){
|
||||
item.setPartyAName(byid);
|
||||
}
|
||||
}
|
||||
//乙方单位(供应商信息列表)
|
||||
if (item.getPartyB() != null){
|
||||
String unitName = xzdSupplierInfoService.queryNameById(item.getPartyB());
|
||||
if (unitName != null){
|
||||
|
||||
item.setPartyBName(unitName);
|
||||
}
|
||||
}
|
||||
//业主单位(客户信息列表)
|
||||
if (item.getOwnerUnit() != null){
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getOwnerUnit());
|
||||
if (byid!=null){
|
||||
item.setOwnerUnitName(byid);
|
||||
}
|
||||
}
|
||||
//监理单位(客户信息列表)
|
||||
if (item.getSupervisionUnit() != null){
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getSupervisionUnit());
|
||||
if (byid!=null){
|
||||
item.setSupervisionUnitName(byid);
|
||||
}
|
||||
}
|
||||
//施工单位(客户信息列表)
|
||||
if (item.getConstructionUnit() != null){
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getConstructionUnit());
|
||||
if (byid!=null){
|
||||
item.setConstructionUnitName(byid);
|
||||
}
|
||||
}
|
||||
//审核单位(客户信息列表)
|
||||
if (item.getAuditUnit() != null){
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getAuditUnit());
|
||||
if (byid!=null){
|
||||
item.setAuditUnitName(byid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取扣款与奖励项
|
||||
* @param vo
|
||||
@ -337,4 +276,16 @@ public class XzdJsCgJungonServiceImpl extends ServiceImpl<XzdJsCgJungonMapper, X
|
||||
vo.setJsqd(list1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String selectNameByIds(String ids) {
|
||||
List<String> list = new ArrayList<>();
|
||||
for (Long id : StringUtils.splitTo(ids, Convert::toLong)) {
|
||||
XzdJsCgJungonVo vo = SpringUtils.getAopProxy(this).getBaseMapper().selectVoById(id);
|
||||
if (ObjectUtil.isNotNull(vo)) {
|
||||
list.add(vo.getDocCode());
|
||||
}
|
||||
}
|
||||
return String.join(StringUtils.SEPARATOR, list);
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,6 @@ public class XzdJsZhfwJinduServiceImpl extends ServiceImpl<XzdJsZhfwJinduMapper,
|
||||
@Override
|
||||
public XzdJsZhfwJinduVo queryById(Long id){
|
||||
XzdJsZhfwJinduVo vo = baseMapper.selectVoById(id);
|
||||
getName(vo);
|
||||
getHttk(vo);
|
||||
return vo;
|
||||
}
|
||||
@ -98,7 +97,6 @@ public class XzdJsZhfwJinduServiceImpl extends ServiceImpl<XzdJsZhfwJinduMapper,
|
||||
public TableDataInfo<XzdJsZhfwJinduVo> queryPageList(XzdJsZhfwJinduBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdJsZhfwJindu> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdJsZhfwJinduVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(this::getName);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@ -111,9 +109,7 @@ public class XzdJsZhfwJinduServiceImpl extends ServiceImpl<XzdJsZhfwJinduMapper,
|
||||
@Override
|
||||
public List<XzdJsZhfwJinduVo> queryList(XzdJsZhfwJinduBo bo) {
|
||||
LambdaQueryWrapper<XzdJsZhfwJindu> lqw = buildQueryWrapper(bo);
|
||||
List<XzdJsZhfwJinduVo> vos = baseMapper.selectVoList(lqw);
|
||||
vos.forEach(this::getName);
|
||||
return vos;
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdJsZhfwJindu> buildQueryWrapper(XzdJsZhfwJinduBo bo) {
|
||||
@ -282,35 +278,6 @@ public class XzdJsZhfwJinduServiceImpl extends ServiceImpl<XzdJsZhfwJinduMapper,
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取部分字段名称
|
||||
* @param item
|
||||
*/
|
||||
private void getName(XzdJsZhfwJinduVo item) {
|
||||
//项目名称
|
||||
if (item.getProject() != null){
|
||||
String projectName = xzdProjectService.queryNameById(item.getProject());
|
||||
if (projectName != null){
|
||||
item.setProjectName(projectName);
|
||||
}
|
||||
}
|
||||
//合同编码
|
||||
if (item.getContractCode() != null){
|
||||
String code = csContractInformationService.queryCodeById(item.getContractCode());
|
||||
if (code != null){
|
||||
item.setContractCodeCode(code);
|
||||
}
|
||||
}
|
||||
//结算单位(客户信息列表)
|
||||
if (item.getSettlementUnit() != null){
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getSettlementUnit());
|
||||
if (byid!=null){
|
||||
item.setSettlementUnitName(byid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取扣款与奖励项
|
||||
* @param vo
|
||||
|
||||
Reference in New Issue
Block a user