bms改造;
This commit is contained in:
+75
-2
@@ -17,10 +17,16 @@ import com.mhd.basic.domain.contractManageDetail.repository.mapper.ContractManag
|
||||
import com.mhd.basic.domain.contractManageDetail.repository.po.ContractManageDetailPO;
|
||||
import com.mhd.basic.domain.contractManageDetail.repository.todo.ContractManageDetailDO;
|
||||
import com.mhd.basic.domain.contractManageDetail.service.ContractManageDetailDomainService;
|
||||
import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||
import com.mhd.basic.domain.contractManageParameters.service.ContractManageParametersDomainService;
|
||||
import com.mhd.basic.domain.expenseAccount.repository.po.ExpenseAccountPO;
|
||||
import com.mhd.basic.domain.expenseAccount.service.ExpenseAccountDomainService;
|
||||
import com.mhd.basic.interfaces.dto.contractManage.*;
|
||||
import com.mhd.basic.interfaces.assember.contractManageParameters.ContractManageParametersAssembler;
|
||||
import com.mhd.basic.interfaces.dto.contractManageDetail.ContractManageDetailDTO;
|
||||
import com.mhd.basic.interfaces.dto.contractManageParameters.ContractManageParametersDTO;
|
||||
import com.mhd.common.core.domain.po.*;
|
||||
import com.mhd.common.core.enums.DictCode;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
@@ -75,6 +81,12 @@ public class ContractManageApplicationService {
|
||||
@Autowired
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
|
||||
@Autowired
|
||||
private ContractManageParametersDomainService contractManageParametersDomainService;
|
||||
|
||||
@Autowired
|
||||
private ContractManageParametersAssembler contractManageParametersAssembler;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询合同管理列表
|
||||
@@ -126,7 +138,21 @@ public class ContractManageApplicationService {
|
||||
contractManageDO.setTopOrganizationId(2827L);
|
||||
}
|
||||
}
|
||||
return contractManageDomainService.queryList(contractManageDO);
|
||||
List<ContractManagePO> list = contractManageDomainService.queryList(contractManageDO);
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
List<Long> contractManageIds = list.stream()
|
||||
.map(ContractManagePO::getContractManageId)
|
||||
.collect(Collectors.toList());
|
||||
List<ContractManageParametersPO> allParams = contractManageParametersDomainService.queryListByManageIds(contractManageIds);
|
||||
Map<Long, List<ContractManageParametersPO>> paramsMap = allParams.stream()
|
||||
.collect(Collectors.groupingBy(ContractManageParametersPO::getContractManageId));
|
||||
for (ContractManagePO po : list) {
|
||||
po.setContractManageParametersList(paramsMap.getOrDefault(po.getContractManageId(), new ArrayList<>()));
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
// public BigDecimal getAmount(List<SubjectAndPriceReturn> subjectAndPriceReturnList) {
|
||||
@@ -610,6 +636,7 @@ public class ContractManageApplicationService {
|
||||
*/
|
||||
//20260702取消同一时间段不能有相同合同校验
|
||||
//checkContract(contractManageDO);
|
||||
checkUniqueActiveContract(contractManageDO);
|
||||
handleData(contractManageDO);
|
||||
handleDict(contractManageDO);
|
||||
contractManageDO.setContractNumber(OrderSequence.getOrderCode("HT"));
|
||||
@@ -618,6 +645,7 @@ public class ContractManageApplicationService {
|
||||
contractManageDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
boolean flag = contractManageDomainService.insert(contractManageDO);
|
||||
handleDetils(contractManageDO, true);
|
||||
handleParameters(contractManageDO);
|
||||
return flag;
|
||||
}
|
||||
|
||||
@@ -638,6 +666,7 @@ public class ContractManageApplicationService {
|
||||
*/
|
||||
//20260702取消同一时间段不能有相同合同校验
|
||||
//checkContract(contractManageDO);
|
||||
checkUniqueActiveContract(contractManageDO);
|
||||
handleData(contractManageDO);
|
||||
handleDict(contractManageDO);
|
||||
contractManageDO.setContractNumber(OrderSequence.getOrderCode("HT"));
|
||||
@@ -645,7 +674,7 @@ public class ContractManageApplicationService {
|
||||
contractManageDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
contractManageDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
boolean flag = contractManageDomainService.insert(contractManageDO);
|
||||
if (flag) {
|
||||
if (!flag) {
|
||||
throw new ServiceException("新增合同管理失败,请检查数据");
|
||||
}
|
||||
handleDetils(contractManageDO, true);
|
||||
@@ -779,6 +808,26 @@ public class ContractManageApplicationService {
|
||||
}
|
||||
}
|
||||
|
||||
private void checkUniqueActiveContract(ContractManageDO contractManageDO) {
|
||||
if (contractManageDO.getContractState() != null && contractManageDO.getContractState() != 2) {
|
||||
return;
|
||||
}
|
||||
if (contractManageDO.getSettlementCustomersId() == null
|
||||
|| StringUtils.isEmpty(contractManageDO.getWarehouseTempLayerType())
|
||||
|| StringUtils.isEmpty(contractManageDO.getContractRentType())) {
|
||||
return;
|
||||
}
|
||||
long count = contractManageDomainService.countByUniqueKey(
|
||||
contractManageDO.getSettlementCustomersId(),
|
||||
contractManageDO.getWarehouseTempLayerType(),
|
||||
contractManageDO.getContractRentType(),
|
||||
contractManageDO.getContractManageId()
|
||||
);
|
||||
if (count > 0) {
|
||||
throw new ServiceException("同一结算客户、同一温层、同一租赁类型只能存在一个使用中的合同");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理合同详情
|
||||
*/
|
||||
@@ -877,6 +926,26 @@ public class ContractManageApplicationService {
|
||||
}
|
||||
}
|
||||
|
||||
private void handleParameters(ContractManageDO contractManageDO) {
|
||||
List<ContractManageParametersPO> existingList = contractManageParametersDomainService.queryListByManageId(contractManageDO.getContractManageId());
|
||||
if (!existingList.isEmpty()) {
|
||||
Long[] ids = existingList.stream().map(ContractManageParametersPO::getId).toArray(Long[]::new);
|
||||
contractManageParametersDomainService.delete(ids);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(contractManageDO.getParametersJson())) {
|
||||
ContractManageParametersDTO dto = new ContractManageParametersDTO();
|
||||
dto.setContractManageId(contractManageDO.getContractManageId());
|
||||
dto.setContractNumber(contractManageDO.getContractNumber());
|
||||
dto.setContractName(contractManageDO.getContractName());
|
||||
dto.setParametersJson(contractManageDO.getParametersJson());
|
||||
dto.setOrganizationId(contractManageDO.getOrganizationId());
|
||||
dto.setOrganizationName(contractManageDO.getOrganizationName());
|
||||
dto.setTopOrganizationId(contractManageDO.getTopOrganizationId());
|
||||
ContractManageParametersDO parametersDO = contractManageParametersAssembler.toDO(dto);
|
||||
contractManageParametersDomainService.insert(parametersDO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改合同管理
|
||||
*/
|
||||
@@ -884,8 +953,10 @@ public class ContractManageApplicationService {
|
||||
public Boolean update(ContractManageDO contractManageDO) {
|
||||
validateContractType(contractManageDO.getContractType());
|
||||
//checkContract(contractManageDO);
|
||||
checkUniqueActiveContract(contractManageDO);
|
||||
handleData(contractManageDO);
|
||||
handleDetils(contractManageDO, false);
|
||||
handleParameters(contractManageDO);
|
||||
handleDict(contractManageDO);
|
||||
return contractManageDomainService.update(contractManageDO);
|
||||
}
|
||||
@@ -911,6 +982,8 @@ public class ContractManageApplicationService {
|
||||
ContractManagePO result = contractManageDomainService.getInfo(contractManageId);
|
||||
List<ContractManageDetailPO> contractManageDetailPOList = contractManageDetailDomainService.queryListByManageId(result.getContractManageId());
|
||||
result.setContractManageDetailPOList(contractManageDetailPOList);
|
||||
List<ContractManageParametersPO> paramsList = contractManageParametersDomainService.queryListByManageId(result.getContractManageId());
|
||||
result.setContractManageParametersList(paramsList);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.mhd.basic.application.service.contractManageParameters;
|
||||
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||
import com.mhd.basic.domain.contractManageParameters.service.ContractManageParametersDomainService;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 合约信息规则维护表ApplicationService
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ContractManageParametersApplicationService {
|
||||
@Autowired
|
||||
private ContractManageParametersDomainService contractManageParametersDomainService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询合约信息规则维护表列表
|
||||
*/
|
||||
|
||||
public List<ContractManageParametersPO> queryList(ContractManageParametersDO contractManageParametersDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null){
|
||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
||||
if (topOrganizationId != null && topOrganizationId != 1){
|
||||
contractManageParametersDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
}
|
||||
}
|
||||
return contractManageParametersDomainService.queryList(contractManageParametersDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增合约信息规则维护表
|
||||
*/
|
||||
public Boolean insert(ContractManageParametersDO contractManageParametersDO) {
|
||||
|
||||
return contractManageParametersDomainService.insert(contractManageParametersDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改合约信息规则维护表
|
||||
*/
|
||||
public Boolean update(ContractManageParametersDO contractManageParametersDO) {
|
||||
return contractManageParametersDomainService.update(contractManageParametersDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除合约信息规则维护表
|
||||
*/
|
||||
public boolean delete(Long[] ids) {
|
||||
return contractManageParametersDomainService.delete(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取合约信息规则维护表详细信息
|
||||
*/
|
||||
public ContractManageParametersPO getInfo(Long id)
|
||||
{
|
||||
return contractManageParametersDomainService.getInfo(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+18
-4
@@ -192,16 +192,30 @@ public class ContractManage extends BaseVOEntity{
|
||||
@ApiModelProperty(name = "是否包含运输费用(1-包含,2-包含)")
|
||||
private Integer transportationCosts;
|
||||
|
||||
@ApiModelProperty("客户类型")
|
||||
@ApiModelProperty("合同租赁类型")
|
||||
private String contractRentType;
|
||||
|
||||
@ApiModelProperty("客户类型编码")
|
||||
@ApiModelProperty("合同租赁类型")
|
||||
private String contractRentTypeName;
|
||||
|
||||
@ApiModelProperty("客户类型")
|
||||
@ApiModelProperty("仓库温层类型")
|
||||
private String warehouseTempLayerType;
|
||||
|
||||
@ApiModelProperty("客户类型编码")
|
||||
@ApiModelProperty("仓库温层类型")
|
||||
private String warehouseTempLayerTypeName;
|
||||
|
||||
@ApiModelProperty("续期提前天数")
|
||||
private Integer renewalAdvanceDays;
|
||||
|
||||
@ApiModelProperty("标的物")
|
||||
private String subjectMatter;
|
||||
|
||||
@ApiModelProperty("性质")
|
||||
private String nature;
|
||||
|
||||
@ApiModelProperty("合同最初起始日")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "合同最初起始日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date initialStartDate;
|
||||
|
||||
}
|
||||
+18
@@ -1,6 +1,7 @@
|
||||
package com.mhd.basic.domain.contractManage.repository.po;
|
||||
|
||||
import com.mhd.basic.domain.contractManageDetail.repository.po.ContractManageDetailPO;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||
import com.mhd.basic.interfaces.dto.contractManageDetail.ContractManageDetailDTO;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
@@ -209,4 +210,21 @@ public class ContractManagePO extends BaseVOEntity{
|
||||
private String warehouseTempLayerTypeName;
|
||||
|
||||
private String isMany;
|
||||
|
||||
@ApiModelProperty("合约信息规则维护列表")
|
||||
private List<ContractManageParametersPO> contractManageParametersList;
|
||||
|
||||
@ApiModelProperty("续期提前天数")
|
||||
private Integer renewalAdvanceDays;
|
||||
|
||||
@ApiModelProperty("标的物")
|
||||
private String subjectMatter;
|
||||
|
||||
@ApiModelProperty("性质")
|
||||
private String nature;
|
||||
|
||||
@ApiModelProperty("合同最初起始日")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "合同最初起始日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date initialStartDate;
|
||||
}
|
||||
+16
@@ -240,4 +240,20 @@ public class ContractManageDO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty("一级费用科目code")
|
||||
private String firstSubjectCode;
|
||||
|
||||
@ApiModelProperty("合约信息规则维护JSON")
|
||||
private String parametersJson;
|
||||
|
||||
@ApiModelProperty("续期提前天数")
|
||||
private Integer renewalAdvanceDays;
|
||||
|
||||
@ApiModelProperty("标的物")
|
||||
private String subjectMatter;
|
||||
|
||||
@ApiModelProperty("性质")
|
||||
private String nature;
|
||||
|
||||
@ApiModelProperty("合同最初起始日")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date initialStartDate;
|
||||
}
|
||||
+16
@@ -193,6 +193,22 @@ public class ContractManageDomainService {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 同结算客户+同温层+同租赁类型+使用中 的合同数量(用于唯一性校验)
|
||||
*/
|
||||
public long countByUniqueKey(Long settlementCustomersId, String warehouseTempLayerType, String contractRentType, Long excludeId) {
|
||||
LambdaQueryWrapper<ContractManage> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ContractManage::getSettlementCustomersId, settlementCustomersId);
|
||||
wrapper.eq(ContractManage::getWarehouseTempLayerType, warehouseTempLayerType);
|
||||
wrapper.eq(ContractManage::getContractRentType, contractRentType);
|
||||
wrapper.eq(ContractManage::getContractState, 2);
|
||||
wrapper.eq(ContractManage::getDelFlag, 1);
|
||||
if (excludeId != null) {
|
||||
wrapper.ne(ContractManage::getContractManageId, excludeId);
|
||||
}
|
||||
return contractManageService.count(wrapper);
|
||||
}
|
||||
|
||||
public ContractManagePO getGeneralContract() {
|
||||
ContractManagePO contractManagePO = new ContractManagePO();
|
||||
LambdaQueryWrapper<ContractManage> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package com.mhd.basic.domain.contractManageParameters.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 合约信息规则维护表
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ContractManageParameters extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("合同管理id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("合同管理id")
|
||||
private Long contractManageId;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("合同编号")
|
||||
@Excel(name = "合同编号")
|
||||
private String contractNumber;
|
||||
|
||||
@ApiModelProperty("合同名称")
|
||||
@Excel(name = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
@ApiModelProperty("合约信息规则维护")
|
||||
@Excel(name = "合约信息规则维护表")
|
||||
private String parametersJson;
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.mhd.basic.domain.contractManageParameters.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 合约信息规则维护表Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
public interface IContractManageParametersService extends IService<ContractManageParameters>
|
||||
{
|
||||
/**
|
||||
* 分页查询合约信息规则维护表列表
|
||||
*/
|
||||
public List<ContractManageParametersPO> queryList(ContractManageParametersDO contractManageParametersDO);
|
||||
|
||||
/**
|
||||
* 新增合约信息规则维护表
|
||||
*/
|
||||
public Boolean insert(ContractManageParametersDO contractManageParametersDO);
|
||||
|
||||
/**
|
||||
* 修改合约信息规则维护表
|
||||
*/
|
||||
public Boolean update(ContractManageParametersDO contractManageParametersDO);
|
||||
|
||||
/**
|
||||
* 批量删除合约信息规则维护表
|
||||
*/
|
||||
public Boolean delete(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询合约信息规则维护表
|
||||
*/
|
||||
public ContractManageParametersPO getInfo(Long id);
|
||||
|
||||
/**
|
||||
* 根据合同管理id查询合约信息规则维护列表
|
||||
*/
|
||||
List<ContractManageParametersPO> getListByContractManageId(Long contractManageId);
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.mhd.basic.domain.contractManageParameters.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
/**
|
||||
* 合约信息规则维护表Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
public interface ContractManageParametersMapper extends BaseMapper<ContractManageParameters>
|
||||
{
|
||||
/**
|
||||
* 查询合约信息规则维护表列表
|
||||
*/
|
||||
public List<ContractManageParametersPO> queryList(@Param("contractManageParametersDO") ContractManageParametersDO contractManageParametersDO);
|
||||
|
||||
/**
|
||||
* 根据合同管理id查询合约信息规则维护列表
|
||||
*/
|
||||
List<ContractManageParametersPO> getListByContractManageId(@Param("contractManageId") Long contractManageId);
|
||||
}
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
package com.mhd.basic.domain.contractManageParameters.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.facade.IContractManageParametersService;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.mapper.ContractManageParametersMapper;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 合约信息规则维护表Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
@Service
|
||||
public class ContractManageParametersImpl extends ServiceImpl<ContractManageParametersMapper, ContractManageParameters> implements IContractManageParametersService{
|
||||
@Autowired
|
||||
private ContractManageParametersMapper contractManageParametersMapper;
|
||||
|
||||
/**
|
||||
* 查询合约信息规则维护表列表
|
||||
*/
|
||||
@Override
|
||||
public List<ContractManageParametersPO> queryList(ContractManageParametersDO contractManageParametersDO)
|
||||
{
|
||||
return contractManageParametersMapper.queryList(contractManageParametersDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增合约信息规则维护表
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(ContractManageParametersDO contractManageParametersDO) {
|
||||
ContractManageParameters contractManageParameters = new ContractManageParameters();
|
||||
BeanUtils.copyProperties(contractManageParametersDO,contractManageParameters);
|
||||
return this.save(contractManageParameters);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改合约信息规则维护表
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(ContractManageParametersDO contractManageParametersDO) {
|
||||
ContractManageParameters contractManageParameters = new ContractManageParameters();
|
||||
BeanUtils.copyProperties(contractManageParametersDO,contractManageParameters);
|
||||
return this.updateById(contractManageParameters);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除合约信息规则维护表
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] ids ) {
|
||||
List<ContractManageParameters> list = new ArrayList<>();
|
||||
for (Long id : ids) {
|
||||
ContractManageParameters contractManageParameters = new ContractManageParameters();
|
||||
contractManageParameters.setId(id);
|
||||
contractManageParameters.setDelFlag(2);
|
||||
list.add(contractManageParameters);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询合约信息规则维护表
|
||||
*/
|
||||
@Override
|
||||
public ContractManageParametersPO getInfo(Long id) {
|
||||
ContractManageParameters contractManageParameters = this.getById(id);
|
||||
ContractManageParametersPO contractManageParametersPO = new ContractManageParametersPO();
|
||||
BeanUtils.copyProperties(contractManageParameters,contractManageParametersPO);
|
||||
return contractManageParametersPO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ContractManageParametersPO> getListByContractManageId(Long contractManageId) {
|
||||
return contractManageParametersMapper.getListByContractManageId(contractManageId);
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.mhd.basic.domain.contractManageParameters.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 合约信息规则维护表对象 contract_manage_parameters
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "合约信息规则维护表对象", description = "合约信息规则维护表响应对象")
|
||||
public class ContractManageParametersPO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("合同管理id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("合同管理id")
|
||||
private Long contractManageId;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("合同编号")
|
||||
@Excel(name = "合同编号")
|
||||
private String contractNumber;
|
||||
|
||||
@ApiModelProperty("合同名称")
|
||||
@Excel(name = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
@ApiModelProperty("合约信息规则维护")
|
||||
@Excel(name = "合约信息规则维护表")
|
||||
private String parametersJson;
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.mhd.basic.domain.contractManageParameters.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 合约信息规则维护表对象 contract_manage_parameters
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ContractManageParametersDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("合同管理id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("合同管理id")
|
||||
private Long contractManageId;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("合同编号")
|
||||
@Excel(name = "合同编号")
|
||||
private String contractNumber;
|
||||
|
||||
@ApiModelProperty("合同名称")
|
||||
@Excel(name = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
@ApiModelProperty("合约信息规则维护")
|
||||
@Excel(name = "合约信息规则维护表")
|
||||
private String parametersJson;
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
package com.mhd.basic.domain.contractManageParameters.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.facade.IContractManageParametersService;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 合约信息规则维护表
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ContractManageParametersDomainService {
|
||||
|
||||
@Autowired
|
||||
private IContractManageParametersService contractManageParametersService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询合约信息规则维护表列表
|
||||
*/
|
||||
public List<ContractManageParametersPO> queryList(ContractManageParametersDO contractManageParametersDO) {
|
||||
return contractManageParametersService.queryList(contractManageParametersDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增合约信息规则维护表
|
||||
*/
|
||||
public Boolean insert(ContractManageParametersDO contractManageParametersDO) {
|
||||
|
||||
return contractManageParametersService.insert(contractManageParametersDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改合约信息规则维护表
|
||||
*/
|
||||
public Boolean update(ContractManageParametersDO contractManageParametersDO) {
|
||||
return contractManageParametersService.update(contractManageParametersDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除合约信息规则维护表
|
||||
*/
|
||||
public Boolean delete(Long[] ids) {
|
||||
return contractManageParametersService.delete(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取合约信息规则维护表详细信息
|
||||
*/
|
||||
public ContractManageParametersPO getInfo(Long id)
|
||||
{
|
||||
return contractManageParametersService.getInfo(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据合同管理id查询合约信息规则维护列表
|
||||
* @param contractManageId
|
||||
* @return
|
||||
*/
|
||||
public List<ContractManageParametersPO> queryListByManageId(Long contractManageId) {
|
||||
List<ContractManageParametersPO> resultList = new ArrayList<>();
|
||||
LambdaQueryWrapper<ContractManageParameters> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ContractManageParameters::getContractManageId,contractManageId);
|
||||
queryWrapper.eq(ContractManageParameters::getDelFlag,1);
|
||||
List<ContractManageParameters> contractManageParametersList = contractManageParametersService.list(queryWrapper);
|
||||
if(contractManageParametersList.size()>0){
|
||||
for (ContractManageParameters contractManageParameters : contractManageParametersList) {
|
||||
ContractManageParametersPO contractManageParametersPO = new ContractManageParametersPO();
|
||||
BeanUtils.copyProperties(contractManageParameters,contractManageParametersPO);
|
||||
resultList.add(contractManageParametersPO);
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
public List<ContractManageParametersPO> queryListByManageIds(Collection<Long> contractManageIds) {
|
||||
List<ContractManageParametersPO> resultList = new ArrayList<>();
|
||||
if (contractManageIds == null || contractManageIds.isEmpty()) {
|
||||
return resultList;
|
||||
}
|
||||
LambdaQueryWrapper<ContractManageParameters> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(ContractManageParameters::getContractManageId, contractManageIds);
|
||||
queryWrapper.eq(ContractManageParameters::getDelFlag, 1);
|
||||
List<ContractManageParameters> entityList = contractManageParametersService.list(queryWrapper);
|
||||
for (ContractManageParameters entity : entityList) {
|
||||
ContractManageParametersPO po = new ContractManageParametersPO();
|
||||
BeanUtils.copyProperties(entity, po);
|
||||
resultList.add(po);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.basic.interfaces.assember.contractManageParameters;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||
import com.mhd.basic.interfaces.dto.contractManageParameters.ContractManageParametersDTO;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 合约信息规则维护表Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
@Component
|
||||
public class ContractManageParametersAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ContractManageParametersDO toDO(ContractManageParametersDTO contractManageParametersDTO) {
|
||||
ContractManageParametersDO contractManageParametersDO = new ContractManageParametersDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(contractManageParametersDTO, contractManageParametersDO, IgnoreNullUtil.getNullPropertyNames(contractManageParametersDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(contractManageParametersDTO.getId() != null){
|
||||
if(userId != null){
|
||||
contractManageParametersDO.setUpdateBy(userId);
|
||||
}else {
|
||||
contractManageParametersDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
contractManageParametersDO.setUpdateByName(userName);
|
||||
contractManageParametersDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
contractManageParametersDO.setCreateBy(userId);
|
||||
contractManageParametersDO.setUpdateBy(userId);
|
||||
}else {
|
||||
contractManageParametersDO.setCreateBy(new Long("0"));
|
||||
contractManageParametersDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
contractManageParametersDO.setCreateByName(userName);
|
||||
contractManageParametersDO.setUpdateByName(userName);
|
||||
contractManageParametersDO.setCreateTime(new Date());
|
||||
contractManageParametersDO.setUpdateTime(new Date());
|
||||
contractManageParametersDO.setDelFlag(1);
|
||||
}
|
||||
return contractManageParametersDO;
|
||||
}
|
||||
|
||||
}
|
||||
+21
-4
@@ -217,15 +217,32 @@ public class ContractManageDTO extends BaseVOEntity{
|
||||
@ApiModelProperty(name = "是否包含运输费用(1-包含,2-包含)")
|
||||
private Integer transportationCosts;
|
||||
|
||||
@ApiModelProperty("客户类型")
|
||||
@ApiModelProperty("合同租赁类型code")
|
||||
private String contractRentType;
|
||||
|
||||
@ApiModelProperty("客户类型编码")
|
||||
@ApiModelProperty("合同租赁类型名称")
|
||||
private String contractRentTypeName;
|
||||
|
||||
@ApiModelProperty("仓库温层类型")
|
||||
@ApiModelProperty("仓库温层类型code")
|
||||
private String warehouseTempLayerType;
|
||||
|
||||
@ApiModelProperty("仓库温层类型编码")
|
||||
@ApiModelProperty("仓库温层类型编码名称")
|
||||
private String warehouseTempLayerTypeName;
|
||||
|
||||
@ApiModelProperty("合约信息规则维护JSON")
|
||||
private String parametersJson;
|
||||
|
||||
@ApiModelProperty("续期提前天数")
|
||||
private Integer renewalAdvanceDays;
|
||||
|
||||
@ApiModelProperty("标的物")
|
||||
private String subjectMatter;
|
||||
|
||||
@ApiModelProperty("性质")
|
||||
private String nature;
|
||||
|
||||
@ApiModelProperty("合同最初起始日")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "合同最初起始日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date initialStartDate;
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.mhd.basic.interfaces.dto.contractManageParameters;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
/**
|
||||
* 合约信息规则维护表对象 contract_manage_parameters
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ContractManageParametersDTO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("合同管理id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("合同管理id")
|
||||
private Long contractManageId;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("合同编号")
|
||||
@Excel(name = "合同编号")
|
||||
private String contractNumber;
|
||||
|
||||
@ApiModelProperty("合同名称")
|
||||
@Excel(name = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
@ApiModelProperty("合约信息规则维护")
|
||||
@Excel(name = "合约信息规则维护表")
|
||||
private String parametersJson;
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
package com.mhd.basic.interfaces.facade.contractManageParameters;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.mhd.basic.interfaces.assember.contractManageParameters.ContractManageParametersAssembler;
|
||||
import com.mhd.system.api.domain.ContractManageParametersFeign;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.mhd.basic.interfaces.dto.contractManageParameters.ContractManageParametersDTO;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||
import com.mhd.basic.application.service.contractManageParameters.ContractManageParametersApplicationService;
|
||||
import javax.annotation.Resource;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 合约信息规则维护表Api
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/contractManageParametersApi")
|
||||
public class ContractManageParametersApi extends BaseController{
|
||||
@Autowired
|
||||
private ContractManageParametersApplicationService contractManageParametersApplicationService;
|
||||
|
||||
@Resource
|
||||
private ContractManageParametersAssembler contractManageParametersAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询合约信息规则维护表列表
|
||||
*/
|
||||
@ApiOperation("查询合约信息规则维护表列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ContractManageParametersDTO contractManageParametersDTO)
|
||||
{
|
||||
//转换实体
|
||||
ContractManageParametersDO contractManageParametersDO = contractManageParametersAssembler.toDO(contractManageParametersDTO);
|
||||
startPage();
|
||||
List<ContractManageParametersPO> list = contractManageParametersApplicationService.queryList(contractManageParametersDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑合约信息规则维护表
|
||||
*/
|
||||
@ApiOperation("编辑合约信息规则维护表")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody ContractManageParametersDTO contractManageParametersDTO)
|
||||
{
|
||||
//转换实体
|
||||
ContractManageParametersDO contractManageParametersDO = contractManageParametersAssembler.toDO(contractManageParametersDTO);
|
||||
if(contractManageParametersDTO.getId() != null){
|
||||
return toAjax(contractManageParametersApplicationService.update(contractManageParametersDO));
|
||||
}else {
|
||||
return toAjax(contractManageParametersApplicationService.insert(contractManageParametersDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除合约信息规则维护表
|
||||
*/
|
||||
@ApiOperation("批量删除合约信息规则维护表")
|
||||
@DeleteMapping("/deleteByIds/{ids}")
|
||||
public AjaxResult delete(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(contractManageParametersApplicationService.delete(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取合约信息规则维护表详细信息
|
||||
*/
|
||||
@ApiOperation("获取合约信息规则维护表")
|
||||
@GetMapping(value = "/getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(contractManageParametersApplicationService.getInfo(id));
|
||||
}
|
||||
|
||||
@ApiOperation("Feign保存合约信息规则维护")
|
||||
@PostMapping("/feignSave")
|
||||
public AjaxResult feignSave(@RequestBody ContractManageParametersFeign contractManageParametersFeign)
|
||||
{
|
||||
try {
|
||||
ContractManageParametersDTO contractManageParametersDTO = new ContractManageParametersDTO();
|
||||
BeanUtils.copyProperties(contractManageParametersFeign, contractManageParametersDTO);
|
||||
ContractManageParametersDO contractManageParametersDO = contractManageParametersAssembler.toDO(contractManageParametersDTO);
|
||||
return toAjax(contractManageParametersApplicationService.insert(contractManageParametersDO));
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -210,6 +210,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="contractManageDO.firstSubjectCode != null and contractManageDO.firstSubjectCode != ''">
|
||||
and b.FIRST_SUBJECT_CODE = #{contractManageDO.firstSubjectCode}
|
||||
</if>
|
||||
<if test="contractManageDO.renewalAdvanceDays != null">
|
||||
and a.renewal_advance_days = #{contractManageDO.renewalAdvanceDays}
|
||||
</if>
|
||||
<if test="contractManageDO.subjectMatter != null and contractManageDO.subjectMatter != ''">
|
||||
and a.subject_matter like concat('%', #{contractManageDO.subjectMatter}, '%')
|
||||
</if>
|
||||
<if test="contractManageDO.nature != null and contractManageDO.nature != ''">
|
||||
and a.nature = #{contractManageDO.nature}
|
||||
</if>
|
||||
<if test="contractManageDO.initialStartDate != null">
|
||||
and a.initial_start_date = #{contractManageDO.initialStartDate}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mhd.basic.domain.contractManageParameters.repository.mapper.ContractManageParametersMapper">
|
||||
|
||||
|
||||
|
||||
<sql id="selectContractManageParametersPo">
|
||||
select
|
||||
*
|
||||
from contract_manage_parameters
|
||||
</sql>
|
||||
|
||||
<sql id="selectContractManageParametersPo1">
|
||||
<where>
|
||||
<if test="contractManageId != null ">
|
||||
and contract_manage_id = #{contractManageId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="contractNumber != null and contractNumber != ''">
|
||||
and contract_number like concat('%', #{contractNumber}, '%')
|
||||
</if>
|
||||
<if test="contractName != null and contractName != ''">
|
||||
and contract_name like concat('%', #{contractName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO"
|
||||
resultType="com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO">
|
||||
<include refid="selectContractManageParametersPo"/>
|
||||
<include refid="selectContractManageParametersPo1"/>
|
||||
</select>
|
||||
|
||||
<select id="getListByContractManageId"
|
||||
resultType="com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO" parameterType="java.lang.Long">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
contract_manage_parameters
|
||||
WHERE
|
||||
contract_manage_id = #{contractManageId}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user