|
|
@ -18,6 +18,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
@Slf4j
|
|
|
@ -124,13 +125,21 @@ public class BussinessTypeService {
|
|
|
|
* @param id
|
|
|
|
* @param id
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public List<BussinessTypeEntity> candidateBussinessType(String mainAction, String customerId) {
|
|
|
|
public List<BussinessTypeEntity> candidateBussinessType(String mainAction, String customerId, String curAction) {
|
|
|
|
if (mainAction.equals(TypeConstant.TYPE_OUT)) {
|
|
|
|
if (mainAction.equals(TypeConstant.TYPE_OUT)) {
|
|
|
|
mainAction = TypeConstant.TYPE_PUT;
|
|
|
|
mainAction = TypeConstant.TYPE_PUT;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
mainAction = TypeConstant.TYPE_OUT;
|
|
|
|
mainAction = TypeConstant.TYPE_OUT;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return bussinessTypeDao.selectCandidateBussinsessTypes(mainAction, customerId);
|
|
|
|
List<BussinessTypeEntity> bussinessTypeEntities = new ArrayList<>();
|
|
|
|
|
|
|
|
if (StrUtil.isNotBlank(curAction)) {
|
|
|
|
|
|
|
|
//当前单据类型已经绑定的平衡补单类型
|
|
|
|
|
|
|
|
BussinessTypeEntity bussinessTypeEntity = bussinessTypeDao.selectByAction(curAction);
|
|
|
|
|
|
|
|
bussinessTypeEntities.add(bussinessTypeEntity);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
List<BussinessTypeEntity> result = bussinessTypeDao.selectCandidateBussinsessTypes(mainAction, customerId);
|
|
|
|
|
|
|
|
bussinessTypeEntities.addAll(result);
|
|
|
|
|
|
|
|
return bussinessTypeEntities;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|