md
This commit is contained in:
parent
871139771f
commit
d77dd7cfd1
@ -45,6 +45,14 @@ public class EmisTmsCostFee extends BaseEntity
|
|||||||
private String feeType;
|
private String feeType;
|
||||||
/* 分摊类型 1-按重量 2-按体积 3-按票 */
|
/* 分摊类型 1-按重量 2-按体积 3-按票 */
|
||||||
private String splitType;
|
private String splitType;
|
||||||
|
/* 运输方式 */
|
||||||
|
private String transType;
|
||||||
|
/* 运输工具标识号 */
|
||||||
|
private String transSignNo;
|
||||||
|
/* 发件地 */
|
||||||
|
private String sendPlace;
|
||||||
|
/* 目的地 */
|
||||||
|
private String destPlace;
|
||||||
/* 成本费 */
|
/* 成本费 */
|
||||||
private BigDecimal costFee;
|
private BigDecimal costFee;
|
||||||
/* 总票数 */
|
/* 总票数 */
|
||||||
@ -57,6 +65,12 @@ public class EmisTmsCostFee extends BaseEntity
|
|||||||
private BigDecimal totalVolume;
|
private BigDecimal totalVolume;
|
||||||
/* 财务确认状态 0-待确认 1-已确认 2-驳回 */
|
/* 财务确认状态 0-待确认 1-已确认 2-驳回 */
|
||||||
private String blConfirmCenter;
|
private String blConfirmCenter;
|
||||||
|
/* 实际装车总件数 */
|
||||||
|
private Integer realPieceNumber;
|
||||||
|
/* 实际装车总重量 */
|
||||||
|
private BigDecimal realTotalWeight;
|
||||||
|
/* 实际装车总体积 */
|
||||||
|
private BigDecimal realTotalVolume;
|
||||||
/* 财务确认日期 */
|
/* 财务确认日期 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date confirmCenterDate;
|
private Date confirmCenterDate;
|
||||||
|
|||||||
@ -11,8 +11,9 @@ package com.xdadan.erp.emis.service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.xdadan.erp.emis.domain.EmisTmsCostFee;
|
import com.xdadan.erp.emis.domain.EmisTmsCostFee;
|
||||||
|
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName EmisTmsCostFeeService
|
* @ClassName EmisTmsCostFeeService
|
||||||
* @Description TMS运输成本账单
|
* @Description TMS运输成本账单
|
||||||
* @author linfso
|
* @author linfso
|
||||||
@ -50,7 +51,7 @@ public interface IEmisTmsCostFeeService
|
|||||||
* @param emisTmsCostFee TMS运输成本账单
|
* @param emisTmsCostFee TMS运输成本账单
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertEmisTmsCostFee(EmisTmsCostFee emisTmsCostFee);
|
public int insertEmisTmsCostFee(EmisTmsCostFee emisTmsCostFee) throws EmisBizError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改TMS运输成本账单
|
* 修改TMS运输成本账单
|
||||||
|
|||||||
@ -11,13 +11,21 @@
|
|||||||
package com.xdadan.erp.emis.service.impl;
|
package com.xdadan.erp.emis.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.xdadan.erp.emis.domain.EmisTmsCostFeeRel;
|
||||||
|
import com.xdadan.erp.emis.domain.enumtype.EmisBizErrorType;
|
||||||
|
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||||
|
import com.xdadan.erp.emis.mapper.EmisTmsCostFeeRelMapper;
|
||||||
|
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.xdadan.erp.emis.domain.EmisTmsCostFee;
|
import com.xdadan.erp.emis.domain.EmisTmsCostFee;
|
||||||
import com.xdadan.erp.emis.mapper.EmisTmsCostFeeMapper;
|
import com.xdadan.erp.emis.mapper.EmisTmsCostFeeMapper;
|
||||||
import com.xdadan.erp.emis.service.IEmisTmsCostFeeService;
|
import com.xdadan.erp.emis.service.IEmisTmsCostFeeService;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TMS运输成本账单Service业务层处理
|
* TMS运输成本账单Service业务层处理
|
||||||
*
|
*
|
||||||
* @author linfso
|
* @author linfso
|
||||||
@ -29,6 +37,9 @@ public class EmisTmsCostFeeServiceImpl implements IEmisTmsCostFeeService
|
|||||||
@Autowired
|
@Autowired
|
||||||
private EmisTmsCostFeeMapper emisTmsCostFeeMapper;
|
private EmisTmsCostFeeMapper emisTmsCostFeeMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EmisTmsCostFeeRelMapper emisTmsCostFeeRelMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询TMS运输成本账单
|
* 查询TMS运输成本账单
|
||||||
*
|
*
|
||||||
@ -73,8 +84,23 @@ public class EmisTmsCostFeeServiceImpl implements IEmisTmsCostFeeService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertEmisTmsCostFee(EmisTmsCostFee emisTmsCostFee)
|
@Transactional
|
||||||
{
|
public int insertEmisTmsCostFee(EmisTmsCostFee emisTmsCostFee) throws EmisBizError {
|
||||||
|
// billRelList
|
||||||
|
|
||||||
|
if(CollectionUtils.isEmpty(emisTmsCostFee.getBillRelList())){
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL,"关联单号不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
String costNo = WaybillHelper.genCostNo();
|
||||||
|
emisTmsCostFee.setCostNo(costNo);
|
||||||
|
// 插入关联单号
|
||||||
|
for (EmisTmsCostFeeRel costFeeRel:emisTmsCostFee.getBillRelList()
|
||||||
|
) {
|
||||||
|
costFeeRel.setCostNo(costNo);
|
||||||
|
emisTmsCostFeeRelMapper.insertEmisTmsCostFeeRel(costFeeRel);
|
||||||
|
}
|
||||||
|
|
||||||
return emisTmsCostFeeMapper.insertEmisTmsCostFee(emisTmsCostFee);
|
return emisTmsCostFeeMapper.insertEmisTmsCostFee(emisTmsCostFee);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -59,6 +59,16 @@ public class WaybillHelper {
|
|||||||
return payId.toString();
|
return payId.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成本号生成
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String genCostNo(){
|
||||||
|
Snowflake snowflake = IdUtil.getSnowflake(0, 0);
|
||||||
|
Long payId = snowflake.nextId();
|
||||||
|
return payId.toString();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成结算账单号
|
* 生成结算账单号
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user