demand: TMS系统 - 客户账单管理 - 收款信息查询 - 缴款客户是必填项,但是此界面显示的缴款客户为空呢
committer: heyu
This commit is contained in:
parent
90357b26ee
commit
1e2f0fea17
@ -26,6 +26,7 @@ import com.xdadan.erp.emis.service.EmisBaseService;
|
|||||||
import com.xdadan.erp.emis.service.IEmisSettleBillService;
|
import com.xdadan.erp.emis.service.IEmisSettleBillService;
|
||||||
import com.xdadan.erp.emis.service.IEmisSettleSubBillService;
|
import com.xdadan.erp.emis.service.IEmisSettleSubBillService;
|
||||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||||
|
import jodd.util.StringUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
@ -135,23 +136,8 @@ public class EmisSettlePayRecordServiceImpl extends EmisBaseService implements I
|
|||||||
@Override
|
@Override
|
||||||
public int insertEmisSettlePayRecord(EmisSettlePayRecord emisSettlePayRecord,String payId) throws EmisBizError {
|
public int insertEmisSettlePayRecord(EmisSettlePayRecord emisSettlePayRecord,String payId) throws EmisBizError {
|
||||||
|
|
||||||
if(StringUtils.isEmpty(emisSettlePayRecord.getSettleBillNo())){
|
// 非空校验
|
||||||
throw new EmisBizError(EmisBizErrorType.FAIL,"账单编号不能为空");
|
checkParam(emisSettlePayRecord);
|
||||||
}
|
|
||||||
|
|
||||||
// || BigDecimal.ZERO.compareTo(emisSettlePayRecord.getPayMoney()) == 0
|
|
||||||
if("1".equals(emisSettlePayRecord.getRecType())) {
|
|
||||||
if (emisSettlePayRecord.getPayMoney() == null ) {
|
|
||||||
throw new EmisBizError(EmisBizErrorType.FAIL, "收款金额不能为空");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// || BigDecimal.ZERO.compareTo(emisSettlePayRecord.getRefundMoney()) == 0
|
|
||||||
else if("2".equals(emisSettlePayRecord.getRecType())) {
|
|
||||||
if (emisSettlePayRecord.getRefundMoney()== null ) {
|
|
||||||
throw new EmisBizError(EmisBizErrorType.FAIL, "退款金额不能为空");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 校验交易日期不能晚于当天
|
// 校验交易日期不能晚于当天
|
||||||
checkDate(emisSettlePayRecord);
|
checkDate(emisSettlePayRecord);
|
||||||
@ -238,6 +224,43 @@ public class EmisSettlePayRecordServiceImpl extends EmisBaseService implements I
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void checkParam(EmisSettlePayRecord emisSettlePayRecord) throws EmisBizError {
|
||||||
|
if(StringUtils.isEmpty(emisSettlePayRecord.getSettleBillNo())){
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL,"账单编号不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
if("1".equals(emisSettlePayRecord.getRecType())) {
|
||||||
|
if (emisSettlePayRecord.getPayMoney() == null) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL, "收款金额不能为空");
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(emisSettlePayRecord.getPayType())) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL, "支付方式不能为空");
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(emisSettlePayRecord.getPayMan())) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL, "收款人不能为空");
|
||||||
|
}
|
||||||
|
if (emisSettlePayRecord.getTradeDate() == null) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL, "交易日期不能为空");
|
||||||
|
}
|
||||||
|
} else if("2".equals(emisSettlePayRecord.getRecType())) {
|
||||||
|
if (emisSettlePayRecord.getRefundMoney() == null) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL, "退款金额不能为空");
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(emisSettlePayRecord.getPayMan())) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL, "退款人不能为空");
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(emisSettlePayRecord.getRefundMode())) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL, "退款方式不能为空");
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(emisSettlePayRecord.getRefundReason())) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL, "退款原因不能为空");
|
||||||
|
}
|
||||||
|
if (emisSettlePayRecord.getRefundDate() == null) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL, "退款日期不能为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void checkDate(EmisSettlePayRecord emisSettlePayRecord) throws EmisBizError {
|
private static void checkDate(EmisSettlePayRecord emisSettlePayRecord) throws EmisBizError {
|
||||||
LocalDate today = LocalDate.now();
|
LocalDate today = LocalDate.now();
|
||||||
if (emisSettlePayRecord.getTradeDate() != null) {
|
if (emisSettlePayRecord.getTradeDate() != null) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user