Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
+11
-4
@@ -5,9 +5,12 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.mhd.basic.domain.contractManage.repository.po.ContractManagePO;
|
||||
import com.mhd.basic.domain.contractManage.repository.todo.ContractManageDO;
|
||||
import com.mhd.basic.domain.contractManage.service.ContractManageDomainService;
|
||||
import com.mhd.basic.domain.contractManageDetail.entity.ContractManageDetail;
|
||||
import com.mhd.basic.domain.contractManageDetail.repository.mapper.ContractManageDetailMapper;
|
||||
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;
|
||||
@@ -61,6 +64,8 @@ public class ContractManageApplicationService {
|
||||
@Autowired
|
||||
private ContractManageDetailDomainService contractManageDetailDomainService;
|
||||
@Autowired
|
||||
private ContractManageDetailMapper contractManageDetailMapper;
|
||||
@Autowired
|
||||
private BmsServiceFeign bmsServiceFeign;
|
||||
|
||||
@Autowired
|
||||
@@ -261,15 +266,16 @@ public class ContractManageApplicationService {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
//根据合同编码查询保存合同信息
|
||||
ContractManagePO contractManagePO = contractManageDomainService.getInfoByCode(contractManageDO.getContractNumber());
|
||||
ContractManagePO contractManagePO = contractManageDomainService.getInfoByCode1(contractManageDO.getOriginalContractNumber());
|
||||
//保存合同详情科目
|
||||
List<ContractManageDetailDTO> contractManageDetailDTOList = contractManageDO.getContractManageDetailDTOList();
|
||||
if(null != contractManageDetailDTOList && contractManageDetailDTOList.size()>0){
|
||||
//查询费用科目、计费周期数据字典
|
||||
List<SysDictData> billingAttributesList = dictTypeService.selectDictDataByType(DictCode.BILLING_ATTRIBUTES.getCode());
|
||||
int delete = contractManageDetailMapper.delete(new LambdaQueryWrapper<ContractManageDetail>().eq(ContractManageDetail::getContractManageId, contractManageDO.getContractManageId()));
|
||||
for (ContractManageDetailDTO contractManageDetailDTO : contractManageDetailDTOList) {
|
||||
ContractManageDetailDO contractManageDetailDO = new ContractManageDetailDO();
|
||||
BeanUtils.copyProperties(contractManageDetailDTO,contractManageDetailDO);
|
||||
BeanUtils.copyProperties(contractManageDetailDTO,contractManageDetailDO,"contractManageDetailId");
|
||||
//根据费用科目查询费用信息
|
||||
if(StringUtils.isNotEmpty(contractManageDetailDTO.getSecondSubjectCode())){
|
||||
ExpenseAccountPO expenseAccountPO = expenseAccountDomainService.getInfoByCode(contractManageDetailDTO.getSecondSubjectCode());
|
||||
@@ -332,10 +338,11 @@ public class ContractManageApplicationService {
|
||||
if(null != contractManagePO){
|
||||
contractManageDetailDO.setContractManageId(contractManagePO.getContractManageId());
|
||||
}
|
||||
//contractManageDetailDO.setContractManageId(contractManageDO.getContractManageId());
|
||||
contractManageDetailDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
contractManageDetailDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
contractManageDetailDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
contractManageDetailDomainService.saveOrUpdate(contractManageDetailDO);
|
||||
contractManageDetailDomainService.insert(contractManageDetailDO);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -481,4 +488,4 @@ public class ContractManageApplicationService {
|
||||
public ContractManagePO getGeneralContract() {
|
||||
return contractManageDomainService.getGeneralContract();
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
@@ -1,6 +1,8 @@
|
||||
package com.mhd.basic.domain.contractManage.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -68,14 +70,17 @@ public class ContractManage extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty("结算主体")
|
||||
@Excel(name = "结算主体")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String settlementCustomers;
|
||||
|
||||
@ApiModelProperty("结算主体id")
|
||||
@Excel(name = "结算主体id")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long settlementCustomersId;
|
||||
|
||||
@ApiModelProperty("结算主体code")
|
||||
@Excel(name = "结算主体code")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String settlementCustomersCode;
|
||||
|
||||
@ApiModelProperty("我司身份(1-甲方,2-乙方)")
|
||||
|
||||
+37
-1
@@ -143,6 +143,42 @@ public class ContractManageDomainService {
|
||||
return contractManagePO;
|
||||
}
|
||||
|
||||
public ContractManagePO getInfoByCode1(String contractNumber) {
|
||||
ContractManagePO contractManagePO = new ContractManagePO();
|
||||
LambdaQueryWrapper<ContractManage> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ContractManage::getOriginalContractNumber,contractNumber);
|
||||
queryWrapper.eq(ContractManage::getDelFlag,1);
|
||||
ContractManage contractManage = contractManageService.getOne(queryWrapper);
|
||||
if(null != contractManage){
|
||||
BeanUtils.copyProperties(contractManage,contractManagePO);
|
||||
//得到合同后,查询合同明细
|
||||
List<ContractManageDetailPO> contractManageDetailPOList = contractManageDetailDomainService.queryListByManageId(contractManagePO.getContractManageId());
|
||||
List<ContractManageDetailPO> contractManageDetailSaveList = new ArrayList<>();
|
||||
if(contractManageDetailPOList != null && contractManageDetailPOList.size()>0){
|
||||
//将临时合同中没有,但是通用合同中有的数据过滤出(使用 ObjectUtil.equal 避免 firstSubjectCode/secondSubjectCode 为 null 时 NPE)
|
||||
contractManageDetailSaveList = contractManageDetailPOList.stream().filter(item -> contractManageDetailPOList.stream().anyMatch(item1 -> ObjectUtil.equal(item1.getFirstSubjectCode(), item.getFirstSubjectCode()) && ObjectUtil.equal(item1.getSecondSubjectCode(), item.getSecondSubjectCode()) && item1.getSubjectType()==1)).collect(Collectors.toList());
|
||||
//首先根据结算科目类型将临时合同过滤出
|
||||
List<ContractManageDetailPO> tempContractManageDetailPOList = contractManageDetailPOList.stream().filter(item -> item.getSubjectType()==2).collect(Collectors.toList());
|
||||
//遍历两个集合,将相同费用科目code的数据,进行比较,如果结算科目类型是临时且合同有效期有效,则使用该条数据,将另一条移除
|
||||
for (ContractManageDetailPO manageDetailPO : tempContractManageDetailPOList) {
|
||||
for (ContractManageDetailPO contractManageDetailPO : contractManageDetailPOList) {
|
||||
if(ObjectUtil.equal(contractManageDetailPO.getFirstSubjectCode(), manageDetailPO.getFirstSubjectCode()) && ObjectUtil.equal(contractManageDetailPO.getSecondSubjectCode(), manageDetailPO.getSecondSubjectCode())){
|
||||
//判断如果是临时合同在有效期内,则将该条数据保存到集合contractManageDetailSaveList
|
||||
DateTime start = DateUtil.parseDate(DateUtil.format(manageDetailPO.getSubjectEffectiveDate(),"yyyy-MM-dd"));
|
||||
DateTime end = DateUtil.parseDateTime(DateUtil.format(manageDetailPO.getSubjectEffectiveDate(),"yyyy-MM-dd"));
|
||||
DateTime now = DateUtil.beginOfDay(DateUtil.date());
|
||||
if (now.isAfterOrEquals(start) && now.isBefore(end)) {
|
||||
contractManageDetailSaveList.add(manageDetailPO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
contractManagePO.setContractManageDetailPOList(contractManageDetailSaveList);
|
||||
}
|
||||
return contractManagePO;
|
||||
}
|
||||
|
||||
public void contractEffectiveDateSet() {
|
||||
/*
|
||||
1:查询合同有效期开始时间在今天(含)之前的,并且合同状态为未生效,设置为已生效状态
|
||||
@@ -190,4 +226,4 @@ public class ContractManageDomainService {
|
||||
}
|
||||
return contractManagePO;
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
-3
@@ -31,6 +31,7 @@ import com.mhd.bms.interfaces.dto.businessDocument.BusinessDocumentDTO;
|
||||
import com.mhd.common.core.domain.dto.BusinessDataPushDTO;
|
||||
import com.mhd.common.core.domain.po.OrganizationPo;
|
||||
import com.mhd.common.core.domain.po.SysDictDataVo;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
import com.mhd.common.core.enums.BelongModuleCode;
|
||||
import com.mhd.common.core.enums.DictCode;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
@@ -151,6 +152,9 @@ public class BusinessDocumentApplicationService {
|
||||
businessDocumentDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
businessDocumentDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
businessDocumentDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
UserPo userPo = loginUser.getUserPo();
|
||||
businessDocumentDO.setCreateBy(userPo.getUserId());
|
||||
businessDocumentDO.setCreateByName(userPo.getUserName());
|
||||
//校验使用的表单是否必填校验
|
||||
checkDoucumentType(businessDocumentDO);
|
||||
//处理数据
|
||||
@@ -412,6 +416,9 @@ public class BusinessDocumentApplicationService {
|
||||
checkDoucumentType(businessDocumentDO);
|
||||
//处理数据
|
||||
handleDate(businessDocumentDO);
|
||||
UserPo userPo = loginUser.getUserPo();
|
||||
businessDocumentDO.setUpdateBy(userPo.getUserId());
|
||||
businessDocumentDO.setUpdateByName(userPo.getUserName());
|
||||
return businessDocumentDomainService.update(businessDocumentDO);
|
||||
}
|
||||
|
||||
@@ -588,8 +595,11 @@ public class BusinessDocumentApplicationService {
|
||||
if(businessDocumentPO.getBusinessState()!=2){
|
||||
throw new ServiceException("所选记录"+ businessDocumentPO.getBusinessFlow() +"不是已生效状态不可操作");
|
||||
}
|
||||
//生成计费流水
|
||||
billingStatementDomainService.generateFlow(businessDocumentPO);
|
||||
Integer auditOperation = businessDocumentDTO.getAuditOperation();
|
||||
if(auditOperation != null && auditOperation == 1){
|
||||
//生成计费流水
|
||||
billingStatementDomainService.generateFlow(businessDocumentPO);
|
||||
}
|
||||
businessDocumentIdLongList.add(businessDocumentIdLong);
|
||||
}
|
||||
if(businessDocumentIdLongList.size()>0){
|
||||
@@ -883,4 +893,4 @@ public class BusinessDocumentApplicationService {
|
||||
log.info("定时任务进入BMS业务单据保存--结束");
|
||||
return businessDocumentDomainService.insert(businessDocumentDO);
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
-3
@@ -4,7 +4,9 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.mhd.bms.domain.settlementCustomers.entity.SettlementCustomers;
|
||||
import com.mhd.bms.domain.settlementCustomers.repository.mapper.SettlementCustomersMapper;
|
||||
import com.mhd.bms.domain.settlementCustomers.repository.po.SettlementCustomersPO;
|
||||
import com.mhd.bms.domain.settlementCustomers.repository.todo.SettlementCustomersDO;
|
||||
import com.mhd.bms.domain.settlementCustomers.service.SettlementCustomersDomainService;
|
||||
@@ -51,6 +53,8 @@ public class SettlementCustomersApplicationService {
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
@Autowired
|
||||
private UserServiceFeign userServiceFeign;
|
||||
@Autowired
|
||||
private SettlementCustomersMapper settlementCustomersMapper;
|
||||
|
||||
|
||||
/**
|
||||
@@ -283,7 +287,12 @@ public class SettlementCustomersApplicationService {
|
||||
saveEntity.setSettlementMethodCode("monthly_settle");
|
||||
saveEntity.setMainRole(1);
|
||||
saveEntity.setCustomerTypeCode("customer"); //从货主同步过来的 默认客户
|
||||
saveEntity(saveEntity);
|
||||
Long settlementEntityId = saveEntity.getSettlementEntityId();
|
||||
List<SettlementCustomers> settlementCustomers = settlementCustomersMapper.selectList(new LambdaQueryWrapper<SettlementCustomers>().eq(SettlementCustomers::getSettlementEntityId, settlementEntityId));
|
||||
if(settlementCustomers != null && settlementCustomers.size() > 0){
|
||||
} else {
|
||||
saveEntity(saveEntity);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -309,7 +318,12 @@ public class SettlementCustomersApplicationService {
|
||||
saveEntity.setSettlementMethodCode("monthly_settle");
|
||||
saveEntity.setMainRole(1);
|
||||
saveEntity.setCustomerTypeCode("customer");
|
||||
saveEntity(saveEntity);
|
||||
Long settlementEntityId = saveEntity.getSettlementEntityId();
|
||||
List<SettlementCustomers> settlementCustomers = settlementCustomersMapper.selectList(new LambdaQueryWrapper<SettlementCustomers>().eq(SettlementCustomers::getSettlementEntityId, settlementEntityId));
|
||||
if(settlementCustomers != null && settlementCustomers.size() > 0){
|
||||
} else {
|
||||
saveEntity(saveEntity);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -344,4 +358,4 @@ public class SettlementCustomersApplicationService {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
-2
@@ -220,7 +220,11 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
for (BmsMakeOutInvoiceItem item1 : bmsMakeOutInvoiceItems) {
|
||||
if(item1.getInvoiceValue().compareTo(BigDecimal.ZERO)>0){
|
||||
Ysitem item=new Ysitem();
|
||||
item.setSo_deptid("NG0408");
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
item.setSo_deptid(deptValue);
|
||||
} else {
|
||||
item.setSo_deptid("NG0408");
|
||||
}
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
item.setPk_deptid(deptValue);
|
||||
} else {
|
||||
@@ -478,7 +482,11 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
String settlementCurrencyNcCode = settlementCurrency;
|
||||
makerCodeNc=documentPreparerNcCode;
|
||||
SKitem item=new SKitem();
|
||||
item.setSo_deptid("NG0408");
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
item.setSo_deptid(deptValue);
|
||||
} else {
|
||||
item.setSo_deptid("NG0408");
|
||||
}
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
item.setPk_deptid(deptValue);
|
||||
} else {
|
||||
|
||||
@@ -256,4 +256,9 @@ public class BillManageDO extends BaseVOEntity{
|
||||
private Double taxRate;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
private String receivablePushTimeEnd;
|
||||
private String receivablePushTimeStart;
|
||||
private String paymentPushTimeEnd;
|
||||
private String paymentPushTimeStart;
|
||||
|
||||
}
|
||||
+4
-2
@@ -1,6 +1,7 @@
|
||||
package com.mhd.bms.domain.billingRules.service;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.mhd.bms.domain.billingRules.entity.BillingParams;
|
||||
import com.mhd.bms.domain.billingRules.repository.facade.IBillingParamsService;
|
||||
import com.mhd.bms.domain.billingRules.repository.po.BillingParamsPO;
|
||||
@@ -121,7 +122,8 @@ public class BillingParamsDomainService {
|
||||
}
|
||||
billingParamsList.add(billingParams);
|
||||
}
|
||||
return billingParamsService.saveOrUpdateBatch(billingParamsList);
|
||||
billingParamsService.remove(new LambdaQueryWrapper<BillingParams>().eq(BillingParams::getBillingRulesId, billingRulesDO.getBillingRulesId()));
|
||||
return billingParamsService.saveBatch(billingParamsList);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,4 +138,4 @@ public class BillingParamsDomainService {
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+33
-1
@@ -12,6 +12,7 @@ import com.mhd.bms.domain.billManage.repository.po.BillManagePO;
|
||||
import com.mhd.bms.domain.billManage.service.BillManageDomainService;
|
||||
import com.mhd.bms.domain.billingStatement.entity.BillingStatement;
|
||||
import com.mhd.bms.domain.billingStatement.repository.facade.IBillingStatementService;
|
||||
import com.mhd.bms.domain.billingStatement.repository.po.BillingStatementADDVO;
|
||||
import com.mhd.bms.domain.billingStatement.repository.po.BillingStatementCollectPO;
|
||||
import com.mhd.bms.domain.billingStatement.repository.po.BillingStatementPO;
|
||||
import com.mhd.bms.domain.billingStatement.repository.todo.BillingStatementCollectDO;
|
||||
@@ -37,6 +38,7 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
@@ -265,7 +267,29 @@ public class BillingStatementDomainService {
|
||||
updateWrapper.set(BillingStatement::getUpdateTime,new Date());
|
||||
updateWrapper.set(BillingStatement::getUpdateByName,loginUser.getUserPo().getUserName());
|
||||
updateWrapper.set(BillingStatement::getBillManageId,billingStatementDTO.getBillManageId());
|
||||
return billingStatementService.update(updateWrapper);
|
||||
boolean update = billingStatementService.update(updateWrapper);
|
||||
List<BillingStatementADDVO> billingStatementList = billingStatementDTO.getBillingStatementList();
|
||||
for (BillingStatementADDVO billingStatementADDVO : billingStatementList) {
|
||||
String billingStatementIds = billingStatementADDVO.getBillingStatementId();
|
||||
Set<String> billings = Stream.of(billingStatementIds.split(",")).collect(Collectors.toSet());
|
||||
if (billings != null && billings.size() > 0) {
|
||||
for (String billing : billings) {
|
||||
Long billingStatementId = Long.valueOf(billing);
|
||||
Double taxRate = billingStatementADDVO.getTaxRate();
|
||||
BillingStatement billingStatement = billingStatementService.getById(billingStatementId);
|
||||
if (billingStatement != null) {
|
||||
BigDecimal billingAmount = billingStatement.getBillingAmount();
|
||||
BigDecimal taxAmount = billingAmount.divide(BigDecimal.ONE.add(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))),10, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal taxFreeFee = billingAmount.subtract(taxAmount);
|
||||
billingStatement.setTaxAmount(taxAmount);
|
||||
billingStatement.setTaxFreeFee(taxFreeFee);
|
||||
billingStatement.setTaxRate(taxRate);
|
||||
billingStatementService.updateById(billingStatement);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return update;
|
||||
}
|
||||
|
||||
|
||||
@@ -390,6 +414,14 @@ public class BillingStatementDomainService {
|
||||
billingStatementDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
billingStatementDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
billingStatementDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
|
||||
BigDecimal billingAmount = billingStatementDO.getBillingAmount();
|
||||
Double taxRate = billingStatementDO.getTaxRate() != null ? billingStatementDO.getTaxRate() : 0.0;
|
||||
BigDecimal taxAmount = billingAmount.divide(BigDecimal.ONE.add(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))),10, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal taxFreeFee = billingAmount.subtract(taxAmount);
|
||||
billingStatementDO.setTaxAmount(taxAmount);
|
||||
billingStatementDO.setTaxFreeFee(taxFreeFee);
|
||||
|
||||
//处理数据
|
||||
handleData(billingStatementDO);
|
||||
return this.insert(billingStatementDO);
|
||||
|
||||
+1
@@ -138,4 +138,5 @@ public class BmsInvoiceListQueryDTO implements Serializable {
|
||||
@ApiModelProperty(value = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
private String billNumber;
|
||||
}
|
||||
+2
-1
@@ -176,5 +176,6 @@ public class BusinessDocument extends BaseVOEntity{
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
|
||||
@ApiModelProperty("税率")
|
||||
private String taxRate;
|
||||
}
|
||||
+2
@@ -181,4 +181,6 @@ public class BusinessDocumentPO extends BaseVOEntity{
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("税率")
|
||||
private String taxRate;
|
||||
}
|
||||
+2
@@ -201,4 +201,6 @@ public class BusinessDocumentDO extends BaseVOEntity{
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("税率")
|
||||
private String taxRate;
|
||||
}
|
||||
@@ -58,6 +58,10 @@ public class PaymentWallet extends BaseVOEntity{
|
||||
@Excel(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("银行卡号")
|
||||
@Excel(name = "银行卡号")
|
||||
private String bankCardNo;
|
||||
|
||||
@ApiModelProperty("支付方式编码")
|
||||
@Excel(name = "支付方式编码")
|
||||
private String paymentMethodCode;
|
||||
@@ -71,4 +75,4 @@ public class PaymentWallet extends BaseVOEntity{
|
||||
private Long paymentManageId;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+5
-1
@@ -57,6 +57,10 @@ public class PaymentWalletPO extends BaseVOEntity{
|
||||
@Excel(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("银行卡号")
|
||||
@Excel(name = "银行卡号")
|
||||
private String bankCardNo;
|
||||
|
||||
@ApiModelProperty("支付方式编码")
|
||||
@Excel(name = "支付方式编码")
|
||||
private String paymentMethodCode;
|
||||
@@ -71,4 +75,4 @@ public class PaymentWalletPO extends BaseVOEntity{
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+5
-1
@@ -57,6 +57,10 @@ public class PaymentWalletDO extends BaseVOEntity{
|
||||
@Excel(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("银行卡号")
|
||||
@Excel(name = "银行卡号")
|
||||
private String bankCardNo;
|
||||
|
||||
@ApiModelProperty("支付方式编码")
|
||||
@Excel(name = "支付方式编码")
|
||||
private String paymentMethodCode;
|
||||
@@ -74,4 +78,4 @@ public class PaymentWalletDO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
}
|
||||
@@ -267,4 +267,9 @@ public class BillManageDTO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanName;
|
||||
|
||||
private String receivablePushTimeEnd;
|
||||
private String receivablePushTimeStart;
|
||||
private String paymentPushTimeEnd;
|
||||
private String paymentPushTimeStart;
|
||||
}
|
||||
+2
@@ -207,4 +207,6 @@ public class BusinessDocumentDTO extends BaseVOEntity{
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("税率")
|
||||
private String taxRate;
|
||||
}
|
||||
+5
-1
@@ -56,6 +56,10 @@ public class PaymentWalletDTO extends BaseVOEntity{
|
||||
@Excel(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("银行卡号")
|
||||
@Excel(name = "银行卡号")
|
||||
private String bankCardNo;
|
||||
|
||||
@ApiModelProperty("支付方式编码")
|
||||
@Excel(name = "支付方式编码")
|
||||
private String paymentMethodCode;
|
||||
@@ -77,4 +81,4 @@ public class PaymentWalletDTO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="billManageDO.createTimeEnd != null and billManageDO.createTimeEnd != ''">
|
||||
AND date_format(a.create_time,'%Y-%m-%d') <![CDATA[<=]]> #{billManageDO.createTimeEnd}
|
||||
</if>
|
||||
|
||||
<if test="billManageDO.paymentPushTimeStart != null and billManageDO.paymentPushTimeStart != ''">
|
||||
AND date_format(a.SK_SYNCHRONOUS_TIME,'%Y-%m-%d') <![CDATA[>=]]> #{billManageDO.paymentPushTimeStart}
|
||||
</if>
|
||||
<if test="billManageDO.paymentPushTimeEnd != null and billManageDO.paymentPushTimeEnd != ''">
|
||||
AND date_format(a.SK_SYNCHRONOUS_TIME,'%Y-%m-%d') <![CDATA[<=]]> #{billManageDO.paymentPushTimeEnd}
|
||||
</if>
|
||||
<if test="billManageDO.receivablePushTimeStart != null and billManageDO.receivablePushTimeStart != ''">
|
||||
AND date_format(a.SYNCHRONOUS_TIME,'%Y-%m-%d') <![CDATA[>=]]> #{billManageDO.receivablePushTimeStart}
|
||||
</if>
|
||||
<if test="billManageDO.receivablePushTimeEnd != null and billManageDO.receivablePushTimeEnd != ''">
|
||||
AND date_format(a.SYNCHRONOUS_TIME,'%Y-%m-%d') <![CDATA[<=]]> #{billManageDO.receivablePushTimeEnd}
|
||||
</if>
|
||||
|
||||
<if test="billManageDO.createByName != null and billManageDO.createByName != ''">
|
||||
AND a.create_by_name like concat('%', #{billManageDO.createByName}, '%')
|
||||
</if>
|
||||
@@ -58,6 +72,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="billManageDO.reconciliationStatus != null">
|
||||
AND a.reconciliation_status = #{billManageDO.reconciliationStatus}
|
||||
</if>
|
||||
<if test="billManageDO.applyNumber != null and billManageDO.applyNumber != ''">
|
||||
AND a.apply_number = #{billManageDO.applyNumber}
|
||||
</if>
|
||||
<if test="billManageDO.settlementCurrency != null and billManageDO.settlementCurrency != ''">
|
||||
AND a.settlement_currency = #{billManageDO.settlementCurrency}
|
||||
</if>
|
||||
<if test="billManageDO.skSynchronousStatus != null">
|
||||
AND a.sk_synchronous_status = #{billManageDO.skSynchronousStatus}
|
||||
</if>
|
||||
<if test="billManageDO.synchronousStatus != null">
|
||||
AND a.synchronous_status = #{billManageDO.synchronousStatus}
|
||||
</if>
|
||||
<if test="billManageDO.billType != null">
|
||||
AND a.bill_type = #{billManageDO.billType}
|
||||
</if>
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
</select>
|
||||
<sql id="common_where">
|
||||
<if test="bmsInvoiceListQueryDTO.id !=null and bmsInvoiceListQueryDTO.id != ''"> and a.id = #{bmsInvoiceListQueryDTO.id} </if>
|
||||
<if test="bmsInvoiceListQueryDTO.billNumber !=null and bmsInvoiceListQueryDTO.billNumber != ''"> and b.bill_number = #{bmsInvoiceListQueryDTO.billNumber} </if>
|
||||
<if test="bmsInvoiceListQueryDTO.id!=null and bmsInvoiceListQueryDTO.id!=''"> and instr(a.id ,#{bmsInvoiceListQueryDTO.id}) > 0 </if>
|
||||
<if test="bmsInvoiceListQueryDTO.invoiceState!=null"> and instr(a.invoice_state ,#{bmsInvoiceListQueryDTO.invoiceState}) > 0 </if>
|
||||
<if test="bmsInvoiceListQueryDTO.createStartTime!=null and bmsInvoiceListQueryDTO.createEndTime!=null ">
|
||||
|
||||
+10
-2
@@ -706,7 +706,11 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
for (TmsMakeOutInvoiceItem item1 : data) {
|
||||
if(item1.getInvoiceValue().compareTo(BigDecimal.ZERO)>0){
|
||||
Ysitem item=new Ysitem();
|
||||
item.setSo_deptid("NG0408");
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
item.setSo_deptid(deptValue);
|
||||
} else {
|
||||
item.setSo_deptid("NG0408");
|
||||
}
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
item.setPk_deptid(deptValue);
|
||||
} else {
|
||||
@@ -1161,7 +1165,11 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
String settlementCurrencyNcCode = settlementCurrency;
|
||||
makerCodeNc=documentPreparerNcCode;
|
||||
SKitem item=new SKitem();
|
||||
item.setSo_deptid("NG0408");
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
item.setSo_deptid(deptValue);
|
||||
} else {
|
||||
item.setSo_deptid("NG0408");
|
||||
}
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
item.setPk_deptid(deptValue);
|
||||
} else {
|
||||
|
||||
-4
@@ -125,13 +125,9 @@ public class HandoverTaskOrderDomainService {
|
||||
List<Long> ids = pickingMaterialDetailMapper.selectOutUniqueIdsWithPickingByOutOrderNumber(orderNumber);
|
||||
outUniqueIdsWithPicking = ids != null ? new java.util.HashSet<>(ids) : java.util.Collections.emptySet();
|
||||
}
|
||||
// 需要复核时:与复核单一致,仅取 level=1 父级(复核单只展示父级,子级挂在父级下)
|
||||
LambdaQueryWrapper<OutMaterialDetail> omdQuery = new QueryWrapper<OutMaterialDetail>().lambda()
|
||||
.eq(OutMaterialDetail::getOutOrderNumber, orderNumber)
|
||||
.eq(OutMaterialDetail::getDelFlag, 1);
|
||||
if (Integer.valueOf(1).equals(review)) {
|
||||
omdQuery.eq(OutMaterialDetail::getLevel, 1);
|
||||
}
|
||||
List<OutMaterialDetail> outMaterialDetailList = outMaterialDetailMapper.selectList(omdQuery);
|
||||
List<TaskHandoverMaterialDetailPO> materialDetailList = new ArrayList<>();
|
||||
for (OutMaterialDetail omd : outMaterialDetailList) {
|
||||
|
||||
+5
-1
@@ -307,6 +307,9 @@ public class StockShelfOrderDomainService {
|
||||
throw new ServiceException("上架单【" + stockShelfOrderPO.getShelfOrderNumber() + "】数据已被更新,请刷新后重新进行上架");
|
||||
}
|
||||
//上架保存容器使用记录
|
||||
if (CollectionUtils.isEmpty(stockShelfOrderDO.getMaterialDetailList())) {
|
||||
throw new ServiceException("上架数量不能为空,请填写上架数量后再提交");
|
||||
}
|
||||
genContainerUsageRecord(stockShelfOrderDO);
|
||||
//修改物料明细信息
|
||||
shelfMaterialDetailService.batchShelfUpdate(stockShelfOrderDO);
|
||||
@@ -1233,7 +1236,8 @@ public class StockShelfOrderDomainService {
|
||||
public void genContainerUsageRecord(StockShelfOrderDO stockShelfOrderDO) {
|
||||
List<ShelfMaterialDetailDO> shelfMaterialDetailDOList = stockShelfOrderDO.getMaterialDetailList();
|
||||
if (CollectionUtils.isEmpty(shelfMaterialDetailDOList)) {
|
||||
throw new ServiceException("物料明细不能为空");
|
||||
// 无需处理的明细(上架数量全为0时跳过),直接返回
|
||||
return;
|
||||
}
|
||||
//所有明细
|
||||
List<ShelfMaterialDetail> listShelfMaterialDetail = shelfMaterialDetailService.list(new QueryWrapper<ShelfMaterialDetail>().lambda().eq(ShelfMaterialDetail::getShelfOrderNumber, stockShelfOrderDO.getShelfOrderNumber()));
|
||||
|
||||
+12
-12
@@ -191,11 +191,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="queryTotalsByOutNumberAndBaseId" resultType="com.mhd.wms.domain.pickingMaterialDetail.repository.po.PickingMaterialDetailPO">
|
||||
SELECT
|
||||
IFNULL(SUM(b.PICKING_QUANTITY), 0) AS picking_quantity,
|
||||
IFNULL(SUM(b.TOTAL_AREA), 0) AS total_area,
|
||||
IFNULL(SUM(b.TOTAL_VOLUME), 0) AS total_volume,
|
||||
IFNULL(SUM(b.TOTAL_NET_WEIGHT), 0) AS total_net_weight,
|
||||
IFNULL(SUM(b.TOTAL_GROSS_WEIGHT), 0) AS total_gross_weight
|
||||
COALESCE(SUM(b.PICKING_QUANTITY), 0) AS picking_quantity,
|
||||
COALESCE(SUM(b.TOTAL_AREA), 0) AS total_area,
|
||||
COALESCE(SUM(b.TOTAL_VOLUME), 0) AS total_volume,
|
||||
COALESCE(SUM(b.TOTAL_NET_WEIGHT), 0) AS total_net_weight,
|
||||
COALESCE(SUM(b.TOTAL_GROSS_WEIGHT), 0) AS total_gross_weight
|
||||
FROM
|
||||
PICKING_MATERIAL_DETAIL b
|
||||
WHERE
|
||||
@@ -204,7 +204,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="sumPickingQuantityByOutOrderNumber" resultType="java.math.BigDecimal">
|
||||
SELECT IFNULL(SUM(pmd.PICKING_QUANTITY), 0)
|
||||
SELECT COALESCE(SUM(pmd.PICKING_QUANTITY), 0)
|
||||
FROM picking_material_detail pmd
|
||||
INNER JOIN out_material_detail omd ON pmd.OUT_UNIQUE_ID = omd.UNIQUE_ID AND omd.DEL_FLAG = 1
|
||||
WHERE omd.OUT_ORDER_NUMBER = #{outOrderNumber}
|
||||
@@ -217,7 +217,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
INNER JOIN out_material_detail omd ON pmd.OUT_UNIQUE_ID = omd.UNIQUE_ID AND omd.DEL_FLAG = 1
|
||||
WHERE omd.OUT_ORDER_NUMBER = #{outOrderNumber}
|
||||
AND pmd.DEL_FLAG = 1
|
||||
AND IFNULL(pmd.PICKING_QUANTITY, 0) > 0
|
||||
AND COALESCE(pmd.PICKING_QUANTITY, 0) > 0
|
||||
</select>
|
||||
|
||||
<select id="selectOutUniqueIdsWithPickingByOutOrderNumber" resultType="java.lang.Long">
|
||||
@@ -226,7 +226,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
INNER JOIN out_material_detail omd ON pmd.OUT_UNIQUE_ID = omd.UNIQUE_ID AND omd.DEL_FLAG = 1
|
||||
WHERE omd.OUT_ORDER_NUMBER = #{outOrderNumber}
|
||||
AND pmd.DEL_FLAG = 1
|
||||
AND IFNULL(pmd.PICKING_QUANTITY, 0) > 0
|
||||
AND COALESCE(pmd.PICKING_QUANTITY, 0) > 0
|
||||
</select>
|
||||
|
||||
<update id="addQuantity" parameterType="com.mhd.wms.domain.pickingMaterialDetail.repository.todo.PickingMaterialDetailDOByUpdate">
|
||||
@@ -240,22 +240,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<!-- 净重、毛重、体积、面积:拣货填写值直接覆盖,不累加 -->
|
||||
<trim prefix="total_net_weight = CASE unique_id" suffix="END,">
|
||||
<foreach collection="pickingMaterialDetailList" item="item" index="index">
|
||||
WHEN #{item.uniqueId} THEN IFNULL(#{item.totalNetWeight}, total_net_weight)
|
||||
WHEN #{item.uniqueId} THEN COALESCE(#{item.totalNetWeight}, total_net_weight)
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="total_gross_weight = CASE unique_id" suffix="END,">
|
||||
<foreach collection="pickingMaterialDetailList" item="item" index="index">
|
||||
WHEN #{item.uniqueId} THEN IFNULL(#{item.totalGrossWeight}, total_gross_weight)
|
||||
WHEN #{item.uniqueId} THEN COALESCE(#{item.totalGrossWeight}, total_gross_weight)
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="total_volume = CASE unique_id" suffix="END,">
|
||||
<foreach collection="pickingMaterialDetailList" item="item" index="index">
|
||||
WHEN #{item.uniqueId} THEN IFNULL(#{item.totalVolume}, total_volume)
|
||||
WHEN #{item.uniqueId} THEN COALESCE(#{item.totalVolume}, total_volume)
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="total_area = CASE unique_id" suffix="END,">
|
||||
<foreach collection="pickingMaterialDetailList" item="item" index="index">
|
||||
WHEN #{item.uniqueId} THEN IFNULL(#{item.totalArea}, total_area)
|
||||
WHEN #{item.uniqueId} THEN COALESCE(#{item.totalArea}, total_area)
|
||||
</foreach>
|
||||
</trim>
|
||||
update_by = #{updateBy},
|
||||
|
||||
Reference in New Issue
Block a user