作者 陈志颖

合并分支 'dev' 到 'test'

fix:分红退货单导入合约存在性校验



查看合并请求 !60
... ... @@ -359,7 +359,7 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec
undertakerTypesUncheckedAvailable = append(undertakerTypesUncheckedAvailable, 3)
}
// TODO 判断项目关联的合约承接人类型
// 判断项目关联的合约承接人类型
undertakers := make([]*domain.Undertaker, 0)
if countContracts, cooperationContracts, err := cooperationContractRepository.Find(map[string]interface{}{
"offsetLimit": false,
... ... @@ -390,6 +390,7 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec
undertakerUserTypes = append(undertakerUserTypes, int32(3))
}
// 取项目承接人和合约承接人的交集
newUndertakerTypesUncheckedAvailable := utils.Intersect32(undertakerTypesUncheckedAvailable, undertakerUserTypes)
log.Logger.Info("承接人类型", map[string]interface{}{
... ...
... ... @@ -864,12 +864,14 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) ImportDivide
contractNumberExist := false
for _, cooperationContract := range cooperationContracts {
if orderGood.CooperationContractNumber == cooperationContract.CooperationContractNumber {
contractNumberExist = true
break
if cooperationContract.Status == 1 {
contractNumberExist = true
break
}
}
}
if !contractNumberExist {
orderGoodErrMap[dividendsReturnedOrder.OrderGoods[j].LineNumber] = "退货单产品关联的共创合约不存在"
orderGoodErrMap[dividendsReturnedOrder.OrderGoods[j].LineNumber] = "退货单产品关联的共创合约不存在或已暂停"
continue
}
... ...